ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / Developing an application or website / Controls, windows and pages / Controls: Available types / TreeView control
  • Overview
  • Initializing a TreeView control
  • Populating a TreeView control
  • WLanguage properties of TreeView controls
  • Using properties on a TreeView control
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
WINDEV and WEBDEV allow you to programmatically manipulate TreeView controls. 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 programmatically manipulate TreeView controls.
Remarks:
Initializing a TreeView control

Populating a TreeView control

To initialize a TreeView control, all you have to do is describe all the treeview elements with TreeAdd.
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert", "GATEAU-.BMP", "GATEAU-.BMP")
TreeAdd(ARBRE_RecetteTV ,"Recette" + TAB + "Dessert" + TAB + "Glace")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Glace" + TAB + ...
		"Vanille", "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Glace" + TAB + ...
		"Fraise", "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Glace" + TAB + ...
		"Chocolat", "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Coupe")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Coupe" + TAB + ...
		"Pêche Melba", "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Coupe" + TAB + ...
		"Poire belle hélène", ...
	"SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Coupe" + TAB + ...
		"Colonel", "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Tarte aux pommes")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Tarte aux pommes" + TAB + ...
	"à la crème fraîche", "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Tarte aux pommes" + TAB + ...
	"au calvados", "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Crème brûlée", ...
	 "SUIVAN5-.BMP")
TreeAdd(ARBRE_RecetteTV, "Recette" + TAB + "Dessert" + TAB + "Vacherin", ...
	"SUIVAN5-.BMP")
TreeExpand(ARBRE_RecetteTV, "Recette")

WINDEV Note: To optimize the filling of a TreeView control, you can use the AddChildDelayed property on the TreeView control rows.. 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 of TreeView controls
Several WLanguage properties can be used on the TreeView control. For a complete list of WLanguage properties that can be used with TreeView controls, see TreeView control properties.

Using properties on a TreeView control

Example: How to find out the number of elements in a TreeView control:
Trace(ARBRE_MonArbre.Occurrence)

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

Last update: 09/21/2024

Send a report | Local help