Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

Move – PB Docs 2018 – PowerBuilder Library

Move – PB Docs 2018

Move

PowerScript function

Description

Moves a control or object to another position relative to its parent
window, or for some window objects, relative to the screen.

Applies to

Any object or control

Syntax

Argument

Description

objectname

The name of the object or control you want to move to
a new location

x

The x coordinate of the new location in PowerBuilder
units

y

The y coordinate of the new location in PowerBuilder
units

Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs or if
objectname is a maximized window. If any argument’s value is null,
Move returns null.

Usage

The x and y coordinates you specify are the new coordinates of the
upper-left corner of the object or control. If the shape of the object or
control is not rectangular (such as, a RadioButton or Oval), x and y are
the coordinates of the upper-left corner of the box enclosing it. For a
line control, x and y are the BeginX and BeginY properties.

When you move controls, drawing objects, and child windows, the
coordinates you specify are relative to the upper-left corner of the
parent window. When you use Move to position main, pop-up, and response
windows, the coordinates you specify are relative to the upper-left corner
of the display screen.

Move does not move a maximized sheet or window. If the window is
maximized, Move returns -1.

You can specify coordinates outside the frame of the parent window
or screen, which effectively makes the object or control invisible.

To draw the image of a Picture control at a particular position,
without actually moving the control, use the Draw function.

The Move function changes the X and Y properties of the moved
object.

Equivalent syntax

The syntax below directly sets the X and Y properties of an object
or control. Although the result is equivalent to using the Move function,
it causes PowerBuilder to redraw objectname twice, first at the new
location of X and then at the new X and Y location:

These statements cause PowerBuilder to redraw gb_box1 twice:

This statement has the same result but redraws gb_box1 once:

Examples

This statement changes the X and Y properties of gb_box1 to 150 and
200, respectively, and moves gb_box1 to the new location:

This statement moves the picture p_Train2 next to the picture
p_Train1:


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