Share via


Sys.UI.Point 클래스

업데이트: 2007년 11월

위치를 나타내는 정수 좌표 집합이 포함된 개체를 만듭니다.

네임스페이스:Sys.UI

상속: 없음

var objectPointVar = new Sys.UI.Point(x, y);

생성자

이름

설명

Sys.UI.Point 생성자

Point 클래스의 새 인스턴스를 초기화합니다.

멤버

이름

설명

Sys.UI.Point x 속성

Point 개체의 x 좌표(픽셀)를 가져옵니다. 이 속성은 읽기 전용입니다.

Sys.UI.Point y 속성

Point 개체의 y 좌표(픽셀)를 가져옵니다. 이 속성은 읽기 전용입니다.

설명

Sys.UI.DomElement 클래스의 getLocation 메서드는 Point 개체를 반환합니다.

예제

다음 코드 예제에서는 Point 클래스를 사용하는 방법을 보여 줍니다.

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

참고 항목

참조

new 연산자

기타 리소스

언어 참조