GrapeCity SPREAD for Windows Forms 12.0J
SetBounds(Rectangle) メソッド


コントロールの境界を提供するRectangleオブジェクト
指定した境界矩形オブジェクトの位置とサイズを使用して要素の境界を設定します。
構文
'Declaration
 
Public Overloads Overridable Sub SetBounds( _
   ByVal rectInput As Rectangle _
) 
'使用法
 
Dim instance As ElementControl
Dim rectInput As Rectangle
 
instance.SetBounds(rectInput)
public virtual void SetBounds( 
   Rectangle rectInput
)

パラメータ

rectInput
コントロールの境界を提供するRectangleオブジェクト
解説
Rectangle構造体の詳細については、Microsoft .NET Frameworkリファレンスを参照してください。
次のサンプルコードでは、このメンバを使用して、コントロールの境界をRectangle構造体を使用して指定した位置とサイズに設定しています。
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;
Rectangle rect = new Rectangle(10,50,200,150);
control.SetBounds(rect);
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 メンバ
オーバーロード一覧

 

 


Copyright © 2004 GrapeCity inc.