Livecode Wiki

Specifies where an object is. Syntax:

set the location of <object> to <point>


if the location of button 1 is within the rect of field 1 then selectIt
set the location of this stack to the mouseLoc

Use the location property to move an object without resizing it, or to find out where an object is.

The location of a stack is in absolute (screen) coordinates. The first item of a card's location property is equal to the width of stack div 2; the second item is is equal to the height of stack div 2. The location of a group or control is in relative (window) coordinates(glossary).

In window coordinates, the point 0,0 is at the top left of the stack window. In screen coordinates, the point 0,0 is at the top left of the screen.

Changing the location of an object moves it to the new position without resizing it. To change an object's size, set its height, width, or rectangle properties.

See also: move (command), screenLoc (function), stacks (function), moveStack (message), stack (object), card (object), pixels (property), height (property), windowManagerPlace (property), topRight (property), width (property), properties (property),