SetLevelPictures – PB Docs 2022

SetLevelPictures

PowerScript function

Description

Sets the picture indexes for all items at a particular level.

Applies to

TreeView controls

Syntax

Argument

Description

treeviewname

The TreeView control in which you want to set the pictures
for a given TreeView level

level

The TreeView level for which you are setting the picture
indexes

pictureindex

An index from the regular picture list specifying the
picture to be displayed when the item is not selected

selectedpictureindex

An index from the regular picture list specifying the
picture to be displayed when the item is selected

statepictureindex

An index from the state picture list specifying the
picture to be displayed to the left of the regular
picture

overlaypictureindex

An index from the overlay picture list specifying the
picture to be displayed on top of the regular picture

Return value

Integer.

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

Usage

To set pictures for individual items, call GetItem, set the picture
properties, and call SetItem to copy the changes to the TreeView. You must
specify a value for all four indexes. To display nothing, specify
0.

Examples

This example sets the pictures for TreeView level 3, then inserts
two new TreeView items:

See also

AddPicture


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