Image on specific tree node
-
In the treeview, I want to display an image only on few nodes (not all). How do I do this?
Gurpreet
-
In the treeview, I want to display an image only on few nodes (not all). How do I do this?
Gurpreet
-
use treeNode.ImageIndex property. http://msdn.microsoft.com/en-us/library/system.windows.forms.treenode.imageindex.aspx[^]
I am looking for showing image only on specific node. That does not work in this way. It shows image for all nodes or none.
Gurpreet
-
I am looking for showing image only on specific node. That does not work in this way. It shows image for all nodes or none.
Gurpreet
You can set the image index on individual nodes. Node.ImageIndex
Never underestimate the power of human stupidity RAH
-
I am looking for showing image only on specific node. That does not work in this way. It shows image for all nodes or none.
Gurpreet
You need to set the
ImageIndex
(and optionally, theSelectedImageIndex
) on the TreeNode you are interested in changing. If you only want to display an image on this node, you effectively have 2 choices - one is to add a dummy transparent image as the default image for the other nodes; the other is to change theImageIndex
/SelectedImageIndex
for the ones you don't want."WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.