In french: ArbreSelect
Returns the full path of the selected element in a TreeView control.
Example of TreeView control:
can be used on:
- a TreeView control populated programmatically, based on a data file, or based on a variable.
- a single-selection or multi-selection TreeView control. For multi-selection TreeView controls, TreeSelect must be used in a loop in order to get all selected rows.
// Full path of the selected element in the "TREE_TVRecipe" TreeView control
ResPath = TreeSelect(TREE_TVRecipe)
// Selected rows in a multi-selection TreeView Table control populated programmatically
FOR i = 1 _TO_ TreeSelectCount(TREE_TREE1)
Trace("Selected element: " + TreeSelect(TREE_TREE1, False, i))
// Equivalent to:
// i is int
// FOR EACH SELECTED ROW i OF TREE_TREE1
// Trace("Selected element: " + TreeSelect(TREE_TREE1, False, i-1))
<Result> = TreeSelect(<TreeView control> [, <Management of duplicates> [, <Rank>]])
<Result>: Character string
Full path of the selected element, in the following format:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
<TreeView control>: Control name
Name of the TreeView control to be used.
<Management of duplicates>: Optional boolean
Mode for managing duplicates in the elements:
This parameter is ignored.
<Rank>: Optional integer
Rank of the selection for a multi-selection TreeView control. If this parameter is not specified, the index of the first selected row is returned.
For example, to retrieve the first selected element, <Rank> = 1.
To retrieve the second selected element, <Rank> = 2, etc.
This parameter is not supported.
Unit examples (WINDEV): The TreeView control
This page is also available for…