ItemExpanding event
Description
Occurs while a TreeView item is expanding.
Event ID
|
Event ID |
Objects |
|---|---|
|
pbm_tvnitemexpanding |
TreeView |
Parameters
|
Argument |
Description |
|---|---|
|
handle |
Long by reference |
Return Values
Long. Return code choices (specify in
a RETURN statement):
-
0 Continue
processing -
1 Prevents the TreeView from expanding
Usage
The ItemExpanding event occurs before the
ItemExpanded event.
Examples
This example sets the picture and selected picture
for the expanding item:
|
1 |
TreeViewItem l_tvi |
|
1 |
integer li_level |
|
1 |
|
1 |
This.GetItem(handle, l_tvi) |
|
1 |
|
1 |
CHOOSE CASE l_tvi.Level |
|
1 |
   CASE 1 |
|
1 |
      l_tvi.PictureIndex = 5 |
|
1 |
      l_tvi.SelectedPictureIndex = 1 |
|
1 |
   CASE 2 |
|
1 |
      l_tvi.PictureIndex = 5 |
|
1 |
      l_tvi.SelectedPictureIndex = 2 |
|
1 |
   CASE 3 |
|
1 |
      l_tvi.PictureIndex = 5 |
|
1 |
      l_tvi.SelectedPictureIndex = 3 |
|
1 |
   CASE 4 |
|
1 |
      l_tvi.PictureIndex = 4 |
|
1 |
      l_tvi.SelectedPictureIndex = 5 |
|
1 |
END CHOOSE |
|
1 |
|
1 |
This.SetItem(handle, l_tvi) |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest