TreeView Control

The TreeView control displays a list of information in a hierarchical manner. Rather than use an Items collection like all other list-based controls, the TreeView uses a Nodes collection to manage the data in the tree. Each item in the tree is a TreeNode. Each TreeNode can, in turn, consist of a collection of other TreeNodes.

The TreeView class has properties such as ShowLines, ShowLinesAt-Root, and ShowPlusMinus that control its appearance. The control may also be associated with an image list in order to display icons. Other interesting properties and methods include:

  • SelectedNode indicates which node is currently selected.

  • Sorted indicates whether the nodes are sorted.

  • FullRowSelect indicates whether the selection highlighted ...

Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.