ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
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
Returns the number of elements found in a branch of a TreeView control.
Example of TreeView control:
Vocabulary linked to a TreeView control
This number takes into account:
  • all "child" elements (from a node to all its leaves),
  • only the direct "child" elements (next level).
Example
// Number of elements found in the "Desserts" node
// in the "TREE_TVRecipe" control
ResNumber = TreeCount(TREE_TVRecipe, "Recipes" + TAB + "Desserts")
Syntax
<Result> = TreeCount(<TreeView control> [, <Source node> [, <Elements taken into account>]])
<Result>: Integer
  • Number of elements found,
  • -1 if an error occurred.
<TreeView control>: Control name
Name of the TreeView control to be used.
<Source node>: Optional character string
Full path of node from which the calculation will be performed. This node is ignored in the count. This node can be invisible.
If this parameter is not specified or if it corresponds to the NULL constant, the entire TreeView control is taken into account. This parameter has the following format:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
<Elements taken into account>: Optional constant
Level of elements to take into account in the count.
tvAll
(Default value)
All "children" are taken into account.
tvOneLevelOnly the close "children" are taken into account.
Remarks
The following syntaxes are equivalent:
ResNumber = TreeCount(<TreeView control>)

ResNumber = TreeCount(<TreeView control>, NULL)

ResNumber = <TreeView control>.Count
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