treeview and imagelist

S

Sam

Hi again...
I'm trying to assign icons to the root nodes of my treeview.

I've got an imagelist that contains 6 images.
I've assigned this imagelist to be the one of my treeview.
(I've used the properties manager for the above)

I assign an icon to a node as this:

tvRelations.Nodes(iCntr).ImageIndex = 0

where iCntr represents the index of my node.
Unfortunately no images is being displayed... What's wrong ?

Thx
 
H

Herfried K. Wagner [MVP]

Sam said:
I'm trying to assign icons to the root nodes of my treeview.

I've got an imagelist that contains 6 images.
I've assigned this imagelist to be the one of my treeview.
(I've used the properties manager for the above)

I assign an icon to a node as this:

tvRelations.Nodes(iCntr).ImageIndex = 0

where iCntr represents the index of my node.
Unfortunately no images is being displayed... What's wrong ?

If you are calling 'Application.EnableVisualStyles' in order to enable
Windows XP visual styles for your application, call 'Application.DoEvents'
directly after the call to 'EnableVisualStyles'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top