PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Initializing a TreeView control
  • Filling a treeview
  • WLanguage properties associated with the TreeView controls
  • Using properties on 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
WINDEV, WINDEV Mobile and WEBDEV allow you to handle a TreeView control by programming. To do so, use the variable of the TreeView control in the code.
The variable of the TreeView control corresponds to the name of the TreeView control.
This help page explains how to handle a TreeView control by programming.
Notes:
  • Several WLanguage functions are specific to the management of TreeView controls. See the functions for managing the TreeView controls for more details.
  • You also have the ability to handle an element found in a TreeView control by programming. See Handling an element of a TreeView control by programming for more details.
  • Versions 16 and later
    WINDEVWindows Mobile A TreeView control can also be linked to a data file or to a variable.
    New in version 16
    WINDEVWindows Mobile A TreeView control can also be linked to a data file or to a variable.
    WINDEVWindows Mobile A TreeView control can also be linked to a data file or to a variable.
Initializing a TreeView control

Filling a treeview

To initialize a TreeView control, all you have to do is describe all the treeview elements with TreeAdd.
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert", "CAKE-.BMP", "CAKE-.BMP")
TreeAdd(TREE_RecipeTV ,"Recipe" + TAB + "Dessert" + TAB + "Ice cream")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB +  ...
"Vanilla", "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB +  ...
"Strawberry", "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB +  ...
"Chocolate", "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Cup")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ...
"Peach Melba", "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ...
"Cherry Garcia", ...
"NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ...
"Colonel", "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Apple pie")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Apple pie" + TAB + ...
"with whipped cream", "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Apple pie" + TAB + ...
"with apple brandy", "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Crème brûlée", ...
 "NEXT5-.BMP")
TreeAdd(TREE_RecipeTV, "Recipe" + TAB + "Dessert" + TAB + "Meringue with cream", ...
"NEXT5-.BMP")
TreeExpand(TREE_RecipeTV, "Recipe")
Versions 19 and later
WINDEV Note: To optimize the filling of a TreeView control, you have the ability to use ..AddChildDelayed on the rows of the TreeView control. This property is used to define the procedure that will be run to fill the level to expand. The search for children and the fill of children are performed only when the user wants to see them.
New in version 19
WINDEV Note: To optimize the filling of a TreeView control, you have the ability to use ..AddChildDelayed on the rows of the TreeView control. This property is used to define the procedure that will be run to fill the level to expand. The search for children and the fill of children are performed only when the user wants to see them.
WINDEV Note: To optimize the filling of a TreeView control, you have the ability to use ..AddChildDelayed on the rows of the TreeView control. This property is used to define the procedure that will be run to fill the level to expand. The search for children and the fill of children are performed only when the user wants to see them.
WLanguage properties associated with the TreeView controls
Several WLanguage properties can be used on the TreeView control. To find out the entire list of WLanguage properties that can be used with a TreeView control, see Properties associated with the TreeView control.

Using properties on a TreeView control

Example: How to find out the number of elements in a TreeView control:
Trace(TREE_MyTreeView..Occurrence)
Example: How to modify the size of the font for all the elements of a TreeView control:
TREE_MyTreeView..FontSize = 14
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment