PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • 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.
Remarks:
  • Several WLanguage functions are specific to the management of TreeView controls. For more details, see the functions for managing the TreeView controls.
  • You also have the ability to handle an element found in a TreeView control by programming. For more details, see Handling an element of a TreeView control by programming.
  • Versions 16 and later
    Windows Mobile A TreeView control can also be linked to a data file or to a variable.
    New in version 16
    Windows Mobile A TreeView control can also be linked to a data file or to a variable.
    Windows 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")

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.Count)

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