This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. Please help to improve this article by introducing more precise citations. (April 2021) (Learn how and when to remove this template message)
A generic tree view

A tree view is a graphical widget (graphical control element) within a graphical user interface (GUI) in which users can navigate and interact intuitively with concise, hierarchical data presented as nodes in a tree-like format.[1][2] It can also be called an outline view.

Appearance

A tree view is usually a vertical list of nodes arranged in a tree-like structure.[1][2] Each node represents a single data item, displayed as an indented line of text or a rectangular box. The indentation (and sometimes a line drawn between nodes) is used to indicate levels of hierarchy. Every treeview has a root node from which all nodes descend. Below the root node and indented to the right are its child nodes. Each node has exactly one parent node and can have zero or more child nodes. If a node (other than the root node) has a child or children, it is called a branch node. If it has no child, then it is a leaf node.[3] This creates a hierarchical tree-like structure, with branches and subbranches emerging downward and rightwards. The nodes can be differentiated by different colors, icons and fonts to represent the nested relationship between parent nodes and child nodes.[2] An item can be expanded to reveal subitems, if any exist, and collapsed to hide subitems.

Features

Interactivity

Tree view allows users to interact with hierarchical data in a variety of ways, such as :

Customizability

Tree views can be customized for visual appeal and efficiency in the following ways:

Advantages

Tree views offer the following advantages :

Disadvantages

Application

Tree views are used in situations where hierarchical data needs to be displayed and navigated in a graphical interface. For example, they have been used in:

See also

References

  1. ^ a b Alan D. Moore (2021), Python GUI Programming with Tkinter: Design and build functional and user-friendly GUI applications, Packt Publishing Ltd, p. 238
  2. ^ a b c "Tree view". Microsoft Learn. 16 March 2023. Retrieved 19 April 2023.
  3. ^ "How to Use Trees". The Java™ Tutorials. Retrieved 19 April 2023.