Using overlay pictures
The pictures in the overlay list come from the regular picture
list. First you must add pictures to the regular list, either in
the painter or during execution. Then during execution you specify
pictures for the overlay picture list. After that you can assign
an overlay picture to items, individually or with the SetLevelPictures function.
This code adds a picture to the regular picture list and then
assigns it to the overlay list:
|
1 |
integer idx |
|
1 |
idx = tv_1.AddPicture("Custom085!") |
|
1 |
IF tv_1.SetOverlayPicture(1, idx) <> 1 THEN |
|
1 |
   sle_get.Text = "Setting overlay picture failed" |
|
1 |
END IF |
This code for the Clicked event turns the overlay picture
on or off each time the user clicks an item:
|
1 |
treeviewitem tvi |
|
1 |
This.GetItem(handle, tvi) |
|
1 |
IF tvi.OverlayPictureIndex = 0 THEN |
|
1 |
   tvi.OverlayPictureIndex = 1 |
|
1 |
ELSE |
|
1 |
   tvi.OverlayPictureIndex = 0 |
|
1 |
END IF |
|
1 |
This.SetItem(handle, tvi) |
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest