Position the bottom left of the rectangle.
[C#]void Position(double x, double y) void Position(double x, double y, Corner corner) [Visual Basic]Sub Position(x As Double, y As Double) Sub Position(x As Double, y As Double, corner As Corner)
void Position(double x, double y) void Position(double x, double y, Corner corner)
Sub Position(x As Double, y As Double) Sub Position(x As Double, y As Double, corner As Corner)
Moves the rectangle to the supplied position while maintaining the width and height.
The corner moved to the location is indicated by the Pin property but you can override this default by specifying a corner when calling this function.
The following code.
[C#]XRect rc = new XRect();rc.String = "20 20 220 120";Response.Write("Rect = " + rc.String);Response.Write("<br>");rc.Position(50, 50);Response.Write("Pos. = " + rc.String);[Visual Basic]Dim rc As XRect = New XRect() rc.String = "20 20 220 120"Response.Write("Rect = " + rc.String)Response.Write("<br>")rc.Position(50, 50)Response.Write("Pos. = " + rc.String)
XRect rc = new XRect();rc.String = "20 20 220 120";Response.Write("Rect = " + rc.String);Response.Write("<br>");rc.Position(50, 50);Response.Write("Pos. = " + rc.String);
Dim rc As XRect = New XRect() rc.String = "20 20 220 120"Response.Write("Rect = " + rc.String)Response.Write("<br>")rc.Position(50, 50)Response.Write("Pos. = " + rc.String)
Produces the following output.
Rect = 20 20 220 120Pos. = 50 50 250 150
Submit feedback about this site to: