PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • Creating a browsing Treeview control
  • "Delayed fill of sub-levels" option
  • Handling a browsing 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
From version 16, you have the ability to create TreeView controls directly linked to the data.
You can create a browsing TreeView control: the TreeView control will be linked to a data file or to a query.
The programming of the TreeView controls is simplified: there is no need to use the TreeXXX functions directly.
How to proceed?

Creating a browsing Treeview control

To create a browsing TreeView control:
  1. Create a TreeView control ("Insert .. Control .. Treeview").Create a TreeView control (on the "Creation" pane, in the "Data" group, click "TreeView").
  2. Display the description window of control ("Description" from the popup menu).
  3. In the "Content" tab, select "File/Query".
  4. Click the "Add" button. A "<None>" source is automatically added.
  5. Define the characteristics of this source:
    • Source: corresponds to the data file or to the query that will be browsed.
    • Browse: corresponds to the search key used to browse the source.
    • Displayed: corresponds to the item displayed in the TreeView control.
  6. Add (if necessary) a second source for the next level ("Add" button). In this case, you have the ability to define the source of the link for the previous level.
    For example, if the first level browses the Customer file, the second one can browse the Orders file for example. The "Customer.CustomerID" and "Orders.CustomerID" items will be used for the link. By default, the source of the link is automatically deduced from the items and the links defined in the analysis.
  7. Define as many sources as necessary.
    Special case: Recursive browsing treeview
    A browsing TreeView control can display records that depend on the previous record (standard case of a recursive link used to manage the parents and the children for example).
    To manage this type of TreeView control, you have the ability to define a reflexive link in the "Content" tab of the description window of the TreeView control.
  8. Validate the description window of the Treeview control. The TreeView control is a browsing TreeView.
Versions 19 and later
WINDEV

"Delayed fill of sub-levels" option

When a browsing Treeview control contains a large number of elements and sub-elements, filling it may take some time.
The option "Delayed fill of sub-levels" allows you to fill each sub-level only when the user clicks to expand a level. In this case, the filling time is spread out and the initial fill is much faster.
Note: To use this option on a TreeView control filled by programming, call ..AddChildDelayed.
New in version 19
WINDEV

"Delayed fill of sub-levels" option

When a browsing Treeview control contains a large number of elements and sub-elements, filling it may take some time.
The option "Delayed fill of sub-levels" allows you to fill each sub-level only when the user clicks to expand a level. In this case, the filling time is spread out and the initial fill is much faster.
Note: To use this option on a TreeView control filled by programming, call ..AddChildDelayed.
WINDEV

"Delayed fill of sub-levels" option

When a browsing Treeview control contains a large number of elements and sub-elements, filling it may take some time.
The option "Delayed fill of sub-levels" allows you to fill each sub-level only when the user clicks to expand a level. In this case, the filling time is spread out and the initial fill is much faster.
Note: To use this option on a TreeView control filled by programming, call ..AddChildDelayed.
Handling a browsing TreeView control
A browsing TreeView control can be easily handled:
  • If the browsing Treeview control allows the modification, the modifications performed in the Treeview control will be automatically carried over into the linked data source.
  • If the browsing TreeView control does not allow the input, the linked data source will not be modified by the user directly.
Minimum required version
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment