AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control TreeView
  • Overview
  • Initializing a TreeView control
  • Populating a TreeView control
  • WLanguage properties of 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/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
WINDEV and WEBDEV allow you to handle a TreeView control through 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 through programming.
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 <TreeView>.Add.
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert", "CAKE-.BMP", "CAKE-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB + ...
"Vanilla", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB + ...
"Strawberry", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB + ...
"Chocolate", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ...
"Peach Melba", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ...
"Cherry Garcia", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + "Colonel", ...
"NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Apple pie")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Apple pie" + TAB + ...
"with whipped cream", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Apple pie" + TAB + ...
"with apple brandy", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Crème brûlée", "NEXT5-.BMP")
TREE_TVRecipe.Add("Recipe" + TAB + "Dessert" + TAB + "Meringue with cream", "NEXT5-.BMP")
TREE_TVRecipe.Expand("Recipe")
WINDEV Remark: To properly fill a TreeView control, you can use the AddChildDelayed property 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 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 a TreeView control, see Properties associated with TreeView controls.

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
Versión mínima requerida
  • Versión 23
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 15/09/2023

Señalar un error o enviar una sugerencia | Ayuda local