ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / TreeView control
  • Overview of the TreeView control
  • Control in a window or in a dynamic page
  • Creating a TreeView control
  • Aspect of a TreeView control in a window or in a page
  • Vocabulary associated with the TreeView control
  • Modes for populating a TreeView control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
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:
  1. On the "Creation" tab, in the "Data" group, click "TreeView".
  2. 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.

Aspect of a TreeView control in a window or in a page

WEBDEV - Server code Example of TreeView control displayed in a WEBDEV page.
WEBDEV - Server code Remarks:
  • 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:
NameDefinition
BranchSection 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.
ElementGeneric name corresponding to the content of a TreeView control. Root, Node and Leaf are elements of a TreeView control
SheetLast element of the tree structure: there is no level below.
NodeIntermediate 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.
RootFirst 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:
Related Examples:
The TreeView control Unit examples (WINDEV): The TreeView control
[ + ] Using the TreeView control via the WLanguage Tree functions.
WD Printing TreeViews Training (WINDEV): WD Printing TreeViews
[ + ] This example explains how to print a Treeview.
It uses a "PrintTree" class that can be easily reused for any TreeView control
WD Zip Complete examples (WINDEV): WD Zip
[ + ] This example presents the use of archiving WLanguage functions with compression.
The following topics are presented in this example:
1/ How to create an archive?
2/ How to compress and uncompress files?
3/ How to manage Drag&Drop from the file explorer of Windows to a TreeView control?
Summary of the example supplied with WINDEV:
This example allows you to create and read compressed archives in WDZ, ZIP, CAB and RAR format (in read-only). This feature can be very useful to manage the automatic backups. Furthermore, the example allows you to create multi-volume archives.
The TreeView control (selection bar) Unit examples (WEBDEV): The TreeView control (selection bar)
[ + ] This example explains how to simulate a selection bar on a treeview control.
WD Reflexive link Training (WINDEV): WD Reflexive link
[ + ] This example presents the management of a reflexive link with the WLanguage functions.
The following topics are presented in this example:
1/ Fill a control with HFSQL content (automatic management of reflexive link).
2/ Fill by programming.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help