Arjan092097
asked on
Overlay mask in TTreeView
I'm having trouble with displaying overlay masks in a TreeView.
I'm having a treeview with some items with associated icons in it. I'm trying to use an overlay mask for some of these items by setting the OverlayIndex of the TreeNode to e.g. 1. This doesn't work; the original icon is still displayed.
Does anybody have any suggestions or solutions?? Do I forget something? Any help will be appreciated, especially a working example!
Thanks!
I'm having a treeview with some items with associated icons in it. I'm trying to use an overlay mask for some of these items by setting the OverlayIndex of the TreeNode to e.g. 1. This doesn't work; the original icon is still displayed.
Does anybody have any suggestions or solutions?? Do I forget something? Any help will be appreciated, especially a working example!
Thanks!
As far as I remember, there is a bug relating to OverlayIndex. You can only use index 0 as overlay.
ASKER
With OverlayIndex = 0 it doesn't work either...
Do you do it like this?
You have to call TImageList.Overlay first.
Example:
ImageList1.Overlay(Image_I ndex, Overlay_Index);
TreeView1.Items[Item_Index ].OverlayI ndex := Overlay_Index;
Zif.
You have to call TImageList.Overlay first.
Example:
ImageList1.Overlay(Image_I
TreeView1.Items[Item_Index
Zif.
ASKER
Ok, that works!
Thank you Zif! Just answer the question and you'll get the points :)
Thank you Zif! Just answer the question and you'll get the points :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.