- Overview of TreeView Table control
- How to?
- Creating a TreeView Table control
- Control characteristics
- TreeView column
- Handling the nodes of the tree structure through programming
- Swapping the Table/TreeView Table controls
The TreeView Table control
Overview of TreeView Table control
The TreeView Table control is a cross between the Table control
and the TreeView control
This control is based on the structure of a Table control (column, row, cell) but it also contains a TreeView column that introduces the notion of tree structure. This notion does not exist in a Table control.
A TreeView Table control allows you to perform a single selection or a multiple selection as well as a sort on the columns (sort by level, among sibling elements).
The information displayed in the TreeView Table control can:
- be defined through programming: this is referred to as TreeView Table control populated programmatically.
- come from a data file or query : this is referred to as Browsing TreeView Table. Only the browsing TreeView Table controls loaded in memory are available. In this case, the control handles the records of the data file loaded in memory.
Creating a TreeView Table control
To create a TreeView Table control:
Remark: The dimensions of the control are optimized to take up the available space at the specified position. If the control size does not suit you, press Ctrl + Z: the control size will be reset to default.
- On the "Creation" tab, in the "Data" group,
- expand "Table and List Box" and select "TreeView Table".
- Click where the control will be created in the window or page.
To view the characteristics of the control, select "Description" in the context menu. Two types of information can be viewed:
- the information regarding the entire TreeView Table control (all you have to do is select the name of the control).
- the information regarding each column of the TreeView Table control (all you have to do is select the name of a column).
Table and TreeView Table controls, as well as their columns, share most of their characteristics.
For more details on the characteristics of Table controls, see:
For more details on TreeView Table controls, see:
To choose the column that will display the hierarchy:
- Open the TreeView Table control description window.
- In the "General" tab, enter the number of the desired column in "Number of TreeView column".
Handling the nodes of the tree structure through programming
To modify the images of the treeview nodes in a TreeView Table control, use the following properties:
To easily handle a TreeView Table control, you must be familiar with the following vocabulary:
|Selection bar||Used to view the selected element. A specific color is used in most cases.|
|Branch||Part of the tree structure 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: Root, Node or Leaf are the elements of the tree structure of a TreeView Table|
|Leaf||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 and the leaves correspond to specific nodes.
|Root||First element in the tree structure of the TreeView Table. The entire tree structure can be expanded from this element.|
Swapping the Table/TreeView Table controls
A Treeview Table control can be automatically transformed into a Table control and conversely:
- Select the TreeView Table control to transform.
- On the "Modification" tab, in the "Transformations" group, expand "Refactoring and swapping" and select "Table / TreeView Table".
Unit examples (WINDEV): The TreeView Table control
Training (WINDEV): WD Reflexive link
Unit examples (WINDEV): Drag and drop
Unit examples (WINDEV): The Table/TreeView Table control (Progress Bar columns)
This page is also available for…