Occurs while a TreeView item is expanding.
Event ID |
Objects |
---|---|
pbm_tvnitemexpanding |
TreeView |
Argument |
Description |
---|---|
handle |
Long by reference (the handle of the expanding TreeView item) |
Long. Return code choices (specify in a RETURN statement):
0 Continue processing
1 Prevents the TreeView from expanding
The ItemExpanding event occurs before the ItemExpanded event.
This example sets the picture and selected picture for the expanding item:
TreeViewItem l_tvi
integer li_level
This.GetItem(handle, l_tvi)
CHOOSE CASE l_tvi.Level
CASE 1
l_tvi.PictureIndex = 5
l_tvi.SelectedPictureIndex = 1
CASE 2
l_tvi.PictureIndex = 5
l_tvi.SelectedPictureIndex = 2
CASE 3
l_tvi.PictureIndex = 5
l_tvi.SelectedPictureIndex = 3
CASE 4
l_tvi.PictureIndex = 4
l_tvi.SelectedPictureIndex = 5
END CHOOSE
This.SetItem(handle, l_tvi)