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

SetOverlayPicture – PB Docs 125 – PowerBuilder Library

SetOverlayPicture – PB Docs 125

SetOverlayPicture PowerScript function

Description

Puts an image in the control’s image list into an
overlay image list.

Controls

ListView and TreeView controls

Syntax

Argument

Description

controlname

The name of the ListView or TreeView
control to which you want to add an overlay image.

overlayindex

The index number of the overlay picture
in the overlay image list. The overlay image list is a 1-based array. Overlayindex must
be 1 (for the first image), a previously designated index (replacing
an image), or 1 greater than the current largest index (adding another
image). SetOverlayPicture fails if you specify
an index that creates gaps in the array.

imageindex

The index number of an image in the control’s
main image list. For ListViews, both the large and small pictures
at that index become overlay images. The image is still available
for use as an item’s main image.

Return Values

Integer. Returns 1 if it succeeds and
-1 if an error occurs.

Usage

An overlay picture must have the same height and width as
the picture it is used to overlay. The color specified in the SetPictureMask
property when the picture is inserted becomes transparent when the
picture is used as an overlay, allowing part of the original image
to be visible beneath the overlay.

The overlay list acts as a pointer back to the source image
in the regular picture lists. If you delete an image that is also
used in the overlay list, the displayed overlay pictures are affected
too.

Examples

This example designates overlay images in a ListView
control. The same picture is used for large and small images:

This example designates the first picture in the
TreeView’s main image list as the first overlay picture.
The picture was added to the main image list on the TreeView’s
property sheet:

This code in the TreeView’s Clicked event
assigns the overlay image to the clicked item:


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