Name: location

Synonyms: loc

Type: property

Syntax: set the location of <object> to <point>

Summary:
Specifies where an <object(glossary)> is.

Associations: stack, card, field, button, graphic, scrollbar, player,
image, group

Introduced: 1.0

OS: mac, windows, linux, ios, android

Platforms: desktop, server, mobile

Example:
if the location of button 1 is within the rect of field 1 then selectIt

Example:
set the location of this stack to the mouseLoc

Value:
The <location> of an <object(glossary)> is any <expression> that
<evaluate|evaluates> to a <point> --two integers separated by a comma.
The first item of the <location> is the distance in <pixels> from the
left edge of the screen (for <stacks>) or <card> (for other objects) to
the center of the <object(glossary)>. The second <item> is the distance
in <pixels> from the top edge of the screen (for <stacks>) or <card>
(for other objects) to the center of the <object(glossary)>.

For cards, the <location> <property> is <read-only> and cannot be set.

Description:
Use the <location> <property> to move an <object(glossary)> without
resizing it, or to find out where an <object(glossary)> is.

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

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(glossary)> moves it to the new
position without resizing it. To change an <object|object's> size, set
its <height>, <width>, or <rectangle> <properties>.

References: revChangeWindowSize (command), group (command),
move (command), screenLoc (function), stacks (function),
object (glossary), property (glossary), relative coordinates (glossary),
absolute coordinates (glossary), evaluate (glossary),
read-only (glossary), expression (glossary), card (keyword),
item (keyword), rectangle (keyword), point (keyword), control (keyword),
moveStack (message), stack (object), card (object), pixels (property),
height (property), windowManagerPlace (property), topRight (property),
width (property), properties (property)

Tags: ui

