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

AddPicture – PB Docs 150 – PowerBuilder Library

AddPicture – PB Docs 150

AddPicture PowerScript function

Description

Adds a bitmap, icon, or cursor to the main image list.

Controls

PictureListBox, DropDownPictureListBox, and TreeView controls

Syntax

Argument

Description

controlname

The name of the control to which you
want to add an icon, cursor, or bitmap to the main image list

picturename

The name of the icon, cursor, or bitmap
you want to add to the main image list

Return Values

Integer. Returns the picture index number
if it succeeds and -1 if an error occurs.

Usage

The picture is assigned an index in the order in which it
is added to the control.

Adding pictures at runtime does not update the PictureName
property array. Because the picture is added at the end of the list,
the return value from AddPicture is the number
of pictures associated with the control.

Before you add pictures, you can specify scaling for the pictures
by setting the PictureWidth and PictureHeight properties. The dimensions
in effect when you add the first picture determine the scaling for
all pictures. Changing the property values after you add pictures
has no effect.

If you do not specify values for PictureWidth and PictureHeight
before you add pictures, the dimensions of the first image determine
the scaling for all pictures you add.

When a you add a bitmap, specify the color in the bitmap that
will be transparent by setting the PictureMaskColor property before
calling AddPicture. You can change the PictureMaskColor property
between calls.

Examples

This example adds a picture to a TreeView control
and associates it with a new TreeView item:

See Also


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