|
|
|
|
- Overview
- Initializing a TreeView control
- Populating a TreeView control
- WLanguage properties associated with the TreeView controls
- Using properties on a TreeView control
Handling a TreeView control through programming
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 TreeAdd.
TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert", "CAKE-.BMP", "CAKE-.BMP") TreeAdd(TREE_TVRecipe ,"Recipe" + TAB + "Dessert" + TAB + "Ice cream") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB + ... "Vanilla", "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB + ... "Strawberry", "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Ice cream" + TAB + ... "Chocolate", "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Cup") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ... "Peach Melba", "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ... "Cherry Garcia", ... "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Cup" + TAB + ... "Colonel", "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Apple pie") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Apple pie" + TAB + ... "with whipped cream", "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Apple pie" + TAB + ... "with apple brandy", "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Crème brûlée", ... "NEXT5-.BMP") TreeAdd(TREE_TVRecipe, "Recipe" + TAB + "Dessert" + TAB + "Meringue with cream", ... "NEXT5-.BMP") TreeExpand(TREE_TVRecipe, "Recipe")
WLanguage properties associated with the 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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|