ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
  • Selection bar
  • Events run
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
Selects an element in a TreeView control.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// Select the "Desserts" node in the "TREE_TVRecipe" TreeView control
Res = TreeSelectPlus(TREE_TVRecipe, "Recipes" + TAB + "Desserts")
// Initialize the TreeView control
TreeAdd(TREE_Treeview1, "Root", tvDefault, tvDefault, "")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 1", tvDefault, tvDefault, "1")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 2", tvDefault, tvDefault, "2")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 3", tvDefault, tvDefault, "3")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 4", tvDefault, tvDefault, "4")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 2" + TAB + "Sub leaf 2-1", ...
tvDefault, tvDefault, "5")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 2" + TAB + "Sub leaf 2-2", ...
tvDefault, tvDefault, "6")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 2" + TAB + "Sub leaf 2-3", ...
tvDefault, tvDefault, "7")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 2" + TAB + "Sub leaf 2-4", ...
tvDefault, tvDefault, "8")
TreeAdd(TREE_Treeview1, "Root" + TAB + "Leaf 2" + TAB + "Sub leaf 2-5", ...
tvDefault, tvDefault, "9")
 
// Select a TreeView row
TreeSelectPlus(TREE_Treeview, "Root" + TAB + "Leaf 2" + TAB + "Sub leaf 2-5")
Syntax
<Result> = TreeSelectPlus(<TreeView control> , <Element path>)
<Result>: Boolean
  • True if the selection was performed,
  • False if the specified element does not exist.
<TreeView control>: Control name
Name of the TreeView control to be used.
<Element path>: Character string
Full path of element to use. This parameter has the following format:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
If there are two elements with the same name in the path, you can add the IDs of the elements (after their names using TreeID).
Remarks

Selection bar

If the element to select is not visible, the TreeView control is expanded until the element is made visible, then the element is selected.

Events run

When TreeSelectPlus is called, the "Displaying a row" and "Selecting a row" events are not executed.
Component: wd290obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help