Syntax 1 For positioning windows and controls in windows – PB Docs 126

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

Argument

Description

objectname

The name of a control for which you want
to specify a location in the front-to-back order within the window,
or the name of a window for which you want to specify whether it
always displays on top. Objectname cannot be
a child window or a sheet.

position

A SetPosType enumerated datatype. The
values you can specify depend on whether objectname is
a control or a window.

For controls, values are:

  • Behind! – Position objectname behind
    precedingobject in the order

  • ToTop! – Position objectname on
    top of all other controls

  • ToBottom! – Position objectname behind
    all other controls

For windows, values are:

  • TopMost! – Always
    display objectname on top of all other open
    windows

  • NoTopMost! – Do not always display objectname on
    top of all other open windows

precedingobject (optional)

The name of the object you want to position objectname behind. Precedingobject is
required if position is Behind!.

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:

This statement positions cb_two behind cb_three:

This statement makes the window w_signon the
topmost window:

This statement makes the window w_signon no
longer necessarily the topmost window:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x