Saturday, January 16, 2010

Treeview control in vb.net..?

how can i link the nodes in treeview so that when u click a particular node, it will show images or textbox at the right side of the form...i have no idea pls help..tnx!Treeview control in vb.net..?
Ok, the way I handle this is to use the tag attribute of the tree nodes. I add the object or information about the object to the node. When a node is selected, or double clicked in your situation, I recall the tag and then act upon that object.





So, in your case you can pull out the object or image pointer and then display it.Treeview control in vb.net..?
Depends on what you are completely trying to do.





But I would start with using the selectednodechange event of the treeview.





Depending on what all you are tring to display, you may want to make a class that has all the info that you need and save it in the tag of each node that is in the tree. When the node is selected use directcast to get the class out of the treenode.tag and process it.

No comments:

Post a Comment