Link to home
Start Free TrialLog in
Avatar of Jaymol
Jaymol

asked on

TreeView ImageList problem.

Hi.

I'm altering the "Items" property of a treeview at runtime by enumerating a DB table and adding the records in under their appropriate headings.

This is all fine, but then I decided to add images to the items.  The problem I found is that when I click on an item in the treeview, it automatically reverts to an ImageIndex of 0, even though it's 1 (for example).  When I click another item, it goes back to what it should be.  It seems that every item, when clicked, gets it's image from index 0.  I do not want this.  I want items to retain their own icon, even when selected.  To be honest, if this isn't a bug, I don't see any useful reason for it.

Any ideas?

John.
ASKER CERTIFIED SOLUTION
Avatar of kretzschmar
kretzschmar
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
usual the same as the imageindex
Avatar of Jaymol
Jaymol

ASKER

Oh yeah.  I see now.  (Donkey!)

Thanks.