SetLevelPictures
PowerScript function
Description
Sets the picture indexes for all items at a particular level.
Applies to
TreeView controls
Syntax
|
1 |
treeviewname.SetLevelPictures ( level, pictureindex, selectedpictureindex, statepictureindex, overlaypictureindex) |
|
Argument |
Description |
|---|---|
|
treeviewname |
The TreeView control in which you want to set the pictures |
|
level |
The TreeView level for which you are setting the picture |
|
pictureindex |
An index from the regular picture list specifying the |
|
selectedpictureindex |
An index from the regular picture list specifying the |
|
statepictureindex |
An index from the state picture list specifying the |
|
overlaypictureindex |
An index from the overlay picture list specifying the |
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:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
long ll_tvi, ll_child, ll_child2 int li_pict, li_level treeviewitem l_tvi li_level = 6 tv_list.SetLevelPictures( 3, li_level, li_level, & li_level, li_level) ll_tvi = tv_list.FindItem(RootTreeItem! , 0) ll_child = tv_list.InsertItemLast(ll_tvi, "Walton",2) ll_child2 = tv_list.InsertItemLast(ll_child, & "Spitfire Suite", li_level) tv_list.ExpandItem(ll_child) tv_list.SetFirstVisible(ll_child) |
See also