The TreeView control displays nodes hierarchically in a tree. Traditionally, nodes are objects that contain values and can refer to other nodes. A parent node contains child nodes, and the child nodes can be parents to other nodes. Two child nodes that have the same parent node are considered sibling nodes. A tree is a collection of nodes, usually organized in a hierarchical manner. The first parent node of a tree is the root node (a
TreeView can have multiple roots). For example, the file system of a computer can be represented as a tree. The top-level directory (perhaps
C:) would be the root, each subfolder of
C: would be a child node and each child folder could have its own children.
TreeView controls are useful for ...