GrapeCity SPREAD for Windows Forms 11.0J
SetBounds(Int32,Int32,Int32,Int32) メソッド


境界矩形の左上隅のX座標
境界矩形の左上隅のY座標
境界矩形の幅(ピクセル単位)
境界矩形の高さ(ピクセル単位)
要素の境界を、指定したサイズの境界矩形の位置とサイズに設定します。
構文
'Declaration
 
Public Overloads Overridable Shadows Sub SetBounds( _
   ByVal x As Integer, _
   ByVal y As Integer, _
   ByVal width As Integer, _
   ByVal height As Integer _
) 
'使用法
 
Dim instance As ElementControl
Dim x As Integer
Dim y As Integer
Dim width As Integer
Dim height As Integer
 
instance.SetBounds(x, y, width, height)
public virtual new void SetBounds( 
   int x,
   int y,
   int width,
   int height
)

パラメータ

x
境界矩形の左上隅のX座標
y
境界矩形の左上隅のY座標
width
境界矩形の幅(ピクセル単位)
height
境界矩形の高さ(ピクセル単位)
次のサンプルコードでは、このメンバを使用して、コントロールの境界を整数値を使用して指定した位置とサイズに設定しています。
control.Text = "NO SMOKING";
control.ForeColor = Color.Red;
control.TextOrientation = FarPoint.Win.TextOrientation.TextVertical;
control.Picture = Image.FromFile(Application.StartupPath + "\\smokes.bmp", true)
control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight;
control.AlignHorz = FarPoint.Win.HorizontalAlignment.Center;
control.SetBounds(10, 50, 300, 250);
control.Text = "NO SMOKING"
control.ForeColor = Color.Red
control.TextOrientation = FarPoint.Win.TextOrientation.TextVertical
control.Picture = Image.FromFile(Application.StartupPath & "\smokes.bmp", True)
control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight
control.AlignHorz = FarPoint.Win.HorizontalAlignment.Center
control.SetBounds(10, 50, 300, 250)
参照

ElementControl クラス
ElementControl メンバ
オーバーロード一覧

 

 


© 2004-2018, GrapeCity Inc. All rights reserved.