ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
  • Displaying an element at the start of the TreeView control (syntax 2)
  • Selecting an element at row
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
Displays a TreeView control from a specified element (node or leaf) or returns the name of the first element displayed in a TreeView control.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// Name of first element displayed in the "TREE_TVRecipe" TreeView control
ResElementName = TreePosition(TREE_TVRecipe)
Syntax

Finding out the name of the first element displayed in a TreeView control Hide the details

<Result> = TreePosition(<TreeView control> [, <Duplicate identifier>])
<Result>: Character string
Full path of first element displayed in the TreeView control.
This result 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).
<TreeView control>: Control name
Name of the TreeView control to be used.
<Duplicate identifier>: Optional boolean
Specifies the management mode of duplicates in the elements of <Result>:
Java This parameter is ignored.

Displaying a TreeView control from a specified element Hide the details

<Result> = TreePosition(<TreeView control> , <Node path>)
<Result>: Character string
Full path of the first element displayed in the TreeView control after the call to TreePosition.
This result has 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.
<Node path>: Character string
Full path of the node that will be displayed in first position in the TreeView control.
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

Displaying an element at the start of the TreeView control (syntax 2)

The element displayed first may differ from the one requested. Indeed, if there are not enough elements displayed below the <Node Path> element, this element cannot be displayed at the beginning of TreeView control
For example, the "Cold starters" node cannot be displayed at the beginning of TreeView control: there are not enough elements displayed below this node.
Element displayed first

Selecting an element at row <Index>

To select the element at row <Index>, use:
  • the direct assignment:
    <TreeView control> = Index
    If the row is displayed in the TreeView control, the corresponding element is selected.
  • the TreeSelectPlus function:
    TreeSelectPlus(<TreeView control>, <Full element path>)
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