Hello there!

I have the following xml File

<books>
<A >
<B>text</B>
<C>gggg</C>
<D>99999</D>

</A>
</books>
Im using the treeview control(i need to insert 2 different images.
How can i add ia certain image to the node it self and another image to the inertext.
So the nodes will represented with image 1, and the text inside with image 2

p.s
I have add an image list


Thanks Ahead

hello
i have read your post i think i can aid you in some of u may have to knew .
first now we have a form that contains the treeview control and have some nodes in it and we want to add an image behind each node i think that what u want.
if ok ? that is the solution....
we should add a control named image list and add some images to it.
after that we should select the treeview control and specify the imagelist property to the previous imagelist control.
then we can specify the image we want to our node from the imageindex property.

if u want any discussion mail me on nigmforcomputer@hotmail.com

1.you should create an image list and add images to it
2.inside the tee properties ,in the image list section you should add your image list
or you can do
treeView.ImageList=imageList1;//connect tree to image list

3.deicde which image get a node
RootNode.ImageIndex = 0;

Don't confuse treeView.ImageIndex and node.ImageIndex. With treeView.ImageIndex you can define a default image that will be the same for all (unselected) nodes. With node.ImageIndex you can define individual images for each node.

This article has been dead for over six months. Start a new discussion instead.