ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Finds an element (leaf or node) in a TreeView control and returns its path.
Example
// Recherche de l'élément d'identifiant "1" dans le champ Arbre "ARBRE_ArbreClient"
// Remarque : tous les éléments du champ Arbre sont pris en compte
ResChemin = TreeFind(ARBRE_ArbreClient, 1)
// Recherche de l'élément d'identifiant "1" dans le champ Arbre "ARBRE_ArbreClient"
// Recherche à partir de la racine du champ Arbre et uniquement sur les feuilles
ResChemin = TreeFind(ARBRE_ArbreClient, 1, Null, tvLeaf)
Syntax
<Result> = TreeFind(<TreeView control> , <Element to find> [, <Path of source element> [, <Options>]])
<Result>: Character string
  • Path of element found. This string can contain specific control characters. This string can be used in all the functions that manage TreeView controls. This path has the following format:
    "<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
    ["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
  • Empty string ("") if no element corresponds to the search.
<TreeView control>: Control name
Name of the TreeView control to be used.
<Element to find>: Character string or integer
Identifier of element to find. This identifier must be identical to the one used in TreeAdd, TreeInsert or TreeModify.
<Path of source element>: Optional character string
Path of source element for the search in the TreeView control. If this parameter is not specified or if it corresponds to the Null constant, the search is performed from the root of TreeView control.
<Options>: Optional constant (or combination of constants)
Specifies the search characteristics:
tvLeafSearch performed on the leaves of TreeView control.
tvNodeSearch performed on the nodes of TreeView control.
tvOneLevelSearch performed on a single level of tree structure (the elements found below the source branch are ignored). The search is performed on the child elements of source element.

By default, the search is performed with tvLeaf + tvNode (all elements found in the TreeView control are browsed).
Component: wd300obj.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/25/2025

Send a report | Local help