- Overview of the TreeView control
- Control in a window or in a dynamic page
- Creating a TreeView control
- Context menu proposed automatically
- Aspect of a TreeView control in a window or in a page
- Vocabulary associated with the TreeView control
- Modes for populating a TreeView control
Overview of the TreeView control
Control in a window or in a dynamic page
The TreeView control is a tree structure used to simplify the display of information that can be represented hierarchically.
The TreeView control is often used to represent the tree structure of a disk, directory, etc.
Creating a TreeView control
To create a TreeView control:
- On the "Creation" tab, in the "Data" group, click "TreeView".
- Click where the control will be created in the window or page. The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu.
The "Style" tab is used to define several characteristics such as:
- color of even and odd rows.
- image of hovered row.
- image of selected row.
- image and configuration of "+" and "-" buttons.
- checkmark style.
Context menu proposed automatically
The TreeView control can display a specific popup menu proposing automatic features to the user. This menu is proposed by the AAF (Automatic Application Features).
This menu allows the user to:
- copy the content of the row or column.
- expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
- export the content of the TreeView control to Excel, Word, etc.
Aspect of a TreeView control in a window or in a page
Example of TreeView control displayed in a window. In this example, the images of folders have been customized.
The checkmarks found in the TreeView control are available from version 16.
Example of TreeView control displayed in a WEBDEV page.
- In WEBDEV, there is no line connecting the different folders displayed in the TreeView control.
- In WEBDEV, you can configure where the caption of a branch without image will be placed ("Details" tab of the control description window):
Vocabulary associated with the TreeView control
To handle a TreeView control, you must be familiar with some definitions:
|Branch||Section of the TreeView control that can define a path:|
- from the root to a leaf
- from a node to another node
- from a node to a leaf
- from the root to a node.
|Element||Generic name corresponding to the content of a TreeView control. Root, Node and Leaf are elements of a TreeView control|
|Sheet||Last element of the tree structure: there is no level below.|
|Node||Intermediate level, can have higher levels (also called "Parent" levels) and lower levels (also called "Child" levels). |
Remark: The root or the leaves correspond to specific nodes.
|Root||First element of the TreeView control. The entire tree structure can be expanded from this element.|
Modes for populating a TreeView control
A TreeView control can be populated:
Unit examples (WINDEV): The TreeView control
Training (WINDEV): WD Printing TreeViews
Complete examples (WINDEV): WD Zip
Unit examples (WEBDEV): The TreeView control (selection bar)
Training (WINDEV): WD Reflexive link
This page is also available for…