Syntax 1 For positioning windows and controls in windows
Description
For controls in a window, specifies the position of a control
in the front-to-back order within a window. For a window, specifies
whether it always displays on top of other open windows.
Controls
A control within a window or a window
Syntax
1 |
<span>objectname</span>.<span>SetPosition</span> ( <span>position</span> {, <span>precedingobject</span> } ) |
Argument |
Description |
---|---|
objectname |
The name of a control for which you want |
position |
A SetPosType enumerated datatype. The For controls, values are:
For windows, values are:
|
precedingobject (optional) |
The name of the object you want to position objectname behind. Precedingobject is |
Return Values
Integer. Returns 1 when it succeeds and
-1 if an error occurs. If any argument’s value is null, SetPosition returns null.
Usage
The front-to-back order for controls determines which control
covers another when they overlap. If a control completely covers
another control, the control that is in back becomes inaccessible
to the user.
When you specify TopMost! for more than one window, the most
recently executed SetPosition function controls
which window displays on top.
Examples
This statement positions cb_two on
top:
1 |
cb_two.<span>SetPosition</span>(ToTop!) |
This statement positions cb_two behind cb_three:
1 |
cb_two.<span>SetPosition</span>(Behind!, cb_three) |
This statement makes the window w_signon the
topmost window:
1 |
w_signon.<span>SetPosition</span>(TopMost!) |
This statement makes the window w_signon no
longer necessarily the topmost window:
1 |
w_signon.<span>SetPosition</span>(NoTopMost!) |