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

Draw – PB Docs 2019 – PowerBuilder Library

Draw – PB Docs 2019

Draw

PowerScript function

Description

Draws a picture control at a specified location in the current
window.

Applies to

Picture controls

Syntax

Argument

Description

picture

The name of the picture control you want to draw in the
current window

xlocation

The x coordinate of the location (in PowerBuilder units)
at which you want to draw the picture

ylocation

The y coordinate of the location (in PowerBuilder units)
at which you want to draw the picture

Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, Draw returns null. The return value is usually
not used.

Usage

Using the Draw function is faster and produces less flicker than
successively changing the X property of a picture. This is because the
Draw function draws directly on the window rather than recreating a small
window with the picture in it for each change. Therefore, use Draw to draw
pictures in animation.

To create animation, you can place a picture outside the visible
portion of the window and then use the Draw function to draw it at
different locations in the window. However, the image remains at all the
positions where you draw it. If you change the position by small
increments, each new drawing of the picture covers up most of the previous
image.

Using Draw does not change the position of the picture control — it
just displays the control’s image at the specified location. Use the Move
function to actually change the position of the control.

Examples

This statement draws the bitmap p_Train at the location specified by
the X and Y coordinates 100 and 200:

These statements draw the bitmap p_Train in many different locations
so it appears to move from left to right across the window:

See also

Move


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