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.
Applies to
A control within a window or a window
Syntax
|
1 |
objectname.SetPosition ( position {, precedingobject } ) |
|
Argument |
Description |
|---|---|
|
objectname |
The name of a control for which you want to specify a |
|
position |
A SetPosType enumerated datatype. The values you can For controls, values are:
For windows, values are:
|
|
precedingobject (optional) |
The name of the object you want to position objectname |
Return value
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.SetPosition(ToTop!) |
This statement positions cb_two behind cb_three:
|
1 |
cb_two.SetPosition(Behind!, cb_three) |
This statement makes the window w_signon the topmost
window:
|
1 |
w_signon.SetPosition(TopMost!) |
This statement makes the window w_signon no longer necessarily the
topmost window:
|
1 |
w_signon.SetPosition(NoTopMost!) |