PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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
// of "TREE_RecipeTV" treeview
ResNumber = TreeCount(TREE_RecipeTV, "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 TreeView control to use.
<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:
"<Name of Root>" + 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>..Occurrence
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment