Export (0) Print
Expand All

Sys.UI.Point Class

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);

Name

Description

Sys.UI.Point Constructor

Initializes a new instance of the Point class.

Name

Description

Sys.UI.Point x Property

Gets the x-coordinate of the Point object in pixels. This property is read-only.

Sys.UI.Point y Property

Gets the y-coordinate of the Point object in pixels. This property is read-only.

The getLocation method of the Sys.UI.DomElement class returns a Point object.

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/>";


Community Additions

ADD
Show:
© 2014 Microsoft