|
|
|
|
|
TreeCount (Function) In french: ArbreOccurrence Returns the number of elements found in a branch of a TreeView control. Example of TreeView control: This number takes into account: - all "child" elements (from a node to all its leaves),
- only the direct "child" elements (next level).
// 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. | tvOneLevel | Only 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
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|