Spread Windows Forms 11.0 Product Documentation
SetBounds(Int32,Int32,Int32,Int32) Method
Example 


FarPoint.Win Assembly > FarPoint.Win Namespace > ElementControl Class > SetBounds Method : SetBounds(Int32,Int32,Int32,Int32) Method
X-coordinate for bounding rectangle's top-left corner
Y-coordinate for bounding rectangle's top-left corner
Width of bounding rectangle in pixels
Height of bounding rectangle in pixels
Sets the bounds of the element to the position and size of the bounding rectangle of the specified dimensions.
Syntax
'Declaration
 
Public Overloads Overridable Shadows Sub SetBounds( _
   ByVal x As Integer, _
   ByVal y As Integer, _
   ByVal width As Integer, _
   ByVal height As Integer _
) 
'Usage
 
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
)

Parameters

x
X-coordinate for bounding rectangle's top-left corner
y
Y-coordinate for bounding rectangle's top-left corner
width
Width of bounding rectangle in pixels
height
Height of bounding rectangle in pixels
Example
This example shows the use of this member by setting the bounds of the control to the specified location and size, using integer values.
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)
See Also

Reference

ElementControl Class
ElementControl Members
Overload List