Spread Windows Forms 11.0 Product Documentation
SetBounds(Rectangle) Method
Example 


FarPoint.Win Assembly > FarPoint.Win Namespace > ElementControl Class > SetBounds Method : SetBounds(Rectangle) Method
Rectangle object that provides the boundaries for the control
Sets the bounds of the element to the position and size of the specified bounding rectangle object.
Syntax
'Declaration
 
Public Overloads Overridable Sub SetBounds( _
   ByVal rectInput As Rectangle _
) 
'Usage
 
Dim instance As ElementControl
Dim rectInput As Rectangle
 
instance.SetBounds(rectInput)
public virtual void SetBounds( 
   Rectangle rectInput
)

Parameters

rectInput
Rectangle object that provides the boundaries for the control
Remarks
Refer to the Microsoft .NET Framework Reference for more information on the Rectangle structure.
Example
This example shows the use of this member by setting the bounds of the control to the specified position and size using a rectangle structure.
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)
See Also

Reference

ElementControl Class
ElementControl Members
Overload List