PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Interrupting <TreeView>.ListItem
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
Lists the "children" of a node and the "child" elements of these "children" in a TreeView control. A WLanguage procedure is called whenever a "child" element is found.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// List the "children" of the "Desserts" node in the "TREE_RecipeTV" TreeView
// The "ExpandAll" procedure is called
// for each "child" element found in the "Desserts" node
Res = TREE_RecipeTV.ListItem("Recipes" + TAB+ "Desserts", "ExpandAll")
Syntax
<Result> = <TreeView control>.ListItem(<Node path> , <WLanguage procedure> [, <Custom parameter> [, <Duplicate identifier>]])
<Result>: Integer
Number of listed elements.
<TreeView control>: Control name
Name of TreeView control to use.
<Node path>: Character string
Full path of node from which the elements will be listed. This parameter:
  • has the following format:
    "<Name of root>" + TAB + ["<Name of 1st node>" + TAB + ...
    ["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
    In case of duplicates on a path element, this path can contain the element identifier (specified at the end of its name by TreeID).
  • corresponds to the NULL constant to list from the root of TreeView control.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure that will be called whenever a "child" element is found.
For more details on this procedure, see Parameters of the procedure used by <TreeView>.ListItem.
<Custom parameter>: Optional integer
Parameter passed to <WLanguage procedure>.
<Duplicate identifier>: Optional boolean
Indicates the management mode of duplicates in the elements:
  • False (default value): no management is performed.
  • True: the names of path elements are built in order to contain their identifier.
Remarks

Interrupting <TreeView>.ListItem

<TreeView>.ListItem cannot be interrupted as long as all "child" elements have not been browsed.
To force the interruption of the browse performed by <TreeView>.ListItem, use the following code line in <WLanguage procedure>:
RESULT False
In this case, <TreeView>.ListItem returns the number of elements browsed until the call to "RESULT False".
Component : wd250obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment