AddStatePicture – PB Docs 2017

AddStatePicture

PowerScript function

Description

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

Applies to

ListView and TreeView controls

Syntax

Argument

Description

controlname

The name of the ListView or TreeView control to which
you are adding a bitmap, cursor, or icon

picturename

The name of the bitmap, icon, or cursor you are
adding

Return value

Integer.

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

Usage

For ListViews in large icon view, the state picture is a picture
displayed to the left of the large picture, by default in a smaller size.
For TreeViews, the state picture is displayed to the left of the regular
picture and the item is moved to the right to make room for it.

If you specify either StatePictureWidth or StatePictureHeight, the
picture is scaled to the size specified by that property.

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

Examples

This example adds the file star.ico to the state picture index of
the ListView lv_files:

See also

DeleteStatePicture


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