Posn Property

Applies To

Description

With the exception of Menu, MenuItem and Separator objects, Posn is a 2-element numeric vector specifying the y-position and x-position respectively of the top-left corner of the object relative to its parent. For a Form, Posn specifies its position on the screen. The units are defined by the Coord property.

When specifying Posn for ⎕WC, you can allow the y-position or x-position to assume a default value by giving the corresponding element a value of .

Using ⎕WS, if you want to set the y-position, but not the x-position, or vice-versa, you should specify for the item you don't want to change.

For Menu, MenuItem and Separator objects, Posn is a single integer that specifies the position at which the object is to be inserted in its parent. For example, to add a new MenuItem between the third and fourth items in an existing Menu, you would specify its Posn as 4. For these objects, the value of Posn returned by ⎕WG is the current index of the object within its parent.