PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview of the TreeView control
  • Control in a window or in a dynamic page
  • Creating a TreeView control
  • A popup menu automatically proposed
  • Aspect of a TreeView control in a window or in a page
  • Vocabulary associated with the TreeView control
  • Modes for filling a TreeView control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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.
For example, the TreeView control is often used to represent the tree structure of a disk, directory, ...
Creating a TreeView control
To create a TreeView control:
  1. In the window or page editor, click (or select "Insert .. Control .. TreeView").On the "Creation" pane, in the "Data" group, click "TreeView".
  2. Click the position where the control will be created in the window or page. The control appears in creation mode.
To display the control characteristics, select "Description" from the popup menu of control.
Versions 16 and later
WINDEVWindows Mobile 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.
New in version 16
WINDEVWindows Mobile 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.
WINDEVWindows Mobile 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.
Versions 16 and later
WINDEVWindows Mobile

A popup menu automatically proposed

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.
  • Versions 18 and later
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
    New in version 18
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
  • WINDEV in WINDEV only, export the content of the treeview to Excel, Word, ...
New in version 16
WINDEVWindows Mobile

A popup menu automatically proposed

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.
  • Versions 18 and later
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
    New in version 18
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
  • WINDEV in WINDEV only, export the content of the treeview to Excel, Word, ...
WINDEVWindows Mobile

A popup menu automatically proposed

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.
  • Versions 18 and later
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
    New in version 18
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
    expand or collapse all: This option is used to expand or collapse all the elements of the current branch.
  • WINDEV in WINDEV only, export the content of the treeview to Excel, Word, ...

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

WINDEVWindows Mobile Example of TreeView control displayed in a window. In this example, the images of folders have been customized.
Versions 16 and later
The checkmarks found in the TreeView control are available from version 16.
New in version 16
The checkmarks found in the TreeView control are available from version 16.
The checkmarks found in the TreeView control are available from version 16.
WEBDEV - Server code Example of TreeView control displayed in a WEBDEV page.
WEBDEV - Server code Notes:
  • In WEBDEV, there is no line connecting the different TreeView folders.
  • In WEBDEV, you have the ability to configure the position of the caption for a branch without image ("Details" tab of description window of control):
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. Root, Node or Leaf are the elements of a treeview.
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).
Note: The root or the leaves correspond to specific nodes.
RootFirst treeview element. The entire tree structure can be expanded from this element.
Modes for filling a TreeView control
A TreeView control can be filled:
  • by programming, via several processes and WLanguage functions.
  • Versions 16 and later
    WINDEVWindows Mobile via a file link.
    New in version 16
    WINDEVWindows Mobile via a file link.
    WINDEVWindows Mobile via a file link.
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 do I create an archive?
2/ How do I compress and uncompress files?
3/ How do I manage the 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.
Pocket FTPClient Mobile (WINDEV Mobile): Pocket FTPClient
[ + ] This example is an FTP client for Pocket PC.

This example enables you to view the content of an FTP server. It can also used to download files, to rename them or to delete them.
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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment