Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates an object that contains a set of integer coordinates that represent a position.
Namespace: Sys.UI
Inherits: None
var objectPointVar = new Sys.UI.Point(x, y);
Constructors
Name |
Description |
---|---|
Initializes a new instance of the Point class. |
Members
Name |
Description |
---|---|
Gets the x-coordinate of the Point object in pixels. This property is read-only. |
|
Gets the y-coordinate of the Point object in pixels. This property is read-only. |
Remarks
The getLocation method of the Sys.UI.DomElement class returns a Point object.
Example
The following code example shows how to use the Point class.
// Get the location of the element
var elementLoc = Sys.UI.DomElement.getLocation(elementRef);
result += "Before move - Label1 location (x,y) = (" +
elementLoc.x + "," + elementLoc.y + ")<br/>";
// Move the element
Sys.UI.DomElement.setLocation(elementRef, 100, elementLoc.y);
elementLoc = Sys.UI.DomElement.getLocation(elementRef);
result += "After move - Label1 location (x,y) = (" +
elementLoc.x + "," + elementLoc.y + ")<br/>";
// Get the location of the element
var elementLoc = Sys.UI.DomElement.getLocation(elementRef);
result += "Before move - Label1 location (x,y) = (" +
elementLoc.x + "," + elementLoc.y + ")<br/>";
// Move the element
Sys.UI.DomElement.setLocation(elementRef, 100, elementLoc.y);
elementLoc = Sys.UI.DomElement.getLocation(elementRef);
result += "After move - Label1 location (x,y) = (" +
elementLoc.x + "," + elementLoc.y + ")<br/>";