advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Download the code for this article
Do you agree that the TreeView is underused? Did you find this article useful? Do you have different methods for persisting TreeView nodes or other techniques for extending the control's features? Let us know in the vb.general discussion group.
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Making the Most of the VB TreeView Control

Add run-time editing, drag-and-drop features and persistence to the TreeView control.  


advertisement
he TreeView control is one of the most flexible Windows controls. It displays hierarchical data and lets users navigate through the hierarchy by expanding and collapsing nodes at will. I may be slightly biased, but I think it's an awesome tool for building functional Windows interfaces. Yet TreeView controls haven't received the attention they deserve, probably because, as delivered, they're not easy to use in many real-world situations, where users must be able to insert, delete, edit, rearrange, and save the items. This tutorial shows you how to solve these problems.


The downloadable TVEdit sample application (see Figure 1), demonstrates a range of TreeView techniques. It lets you populate a TreeView control at run time, edit the node text, drag and drop nodes, moving them from one position to another, persist the nodes to an XML file and reload a TreeView control from the persisted XML file at some future point.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement