Treeview Images

G

Guest

Ok... I'm missing something simple here. I have an image list with two
images, an open folder (image 1) and a closed folder (image 0). Shouldn't
the following code give me the appropriate folder image when the node is
collapsed or expanded?

Private Sub ResourceTree_AfterExpand(ByVal sender As Object, ByVal e As
System.Windows.Forms.TreeViewEventArgs) Handles MyBase.AfterExpand
e.Node.ImageIndex = 1
End Sub

Private Sub ResourceTree_AfterCollapse(ByVal sender As Object, ByVal e As
System.Windows.Forms.TreeViewEventArgs) Handles MyBase.AfterCollapse
e.Node.ImageIndex = 0
End Sub
 

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