PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • WLanguage procedure
  • Interrupting TreeListItem
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
// Lists the "children" of "Desserts" node in "TREE_RecipeTV" treeview
// The "ExpandAll" procedure is called
// for each "child" element found in the "Desserts" node
Res = TreeListItem(TREE_RecipeTV, "Recipes" + TAB + "Desserts", "ExpandAll")
Syntax
<Result> = TreeListItem(<TreeView Control> , <Node Path> , <Procedure Name> [, <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.
<Procedure Name>: Character string
Name of WLanguage procedure that will be called whenever a "child" element is found.
<Custom Parameter>: Optional integer
Parameter passed to the <Procedure Name> 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

WLanguage procedure

The <Procedure Name> procedure is called whenever a "child" element is found. This procedure is a WLanguage procedure.
This procedure must be declared as follows:
PROCEDURE <Procedure Name> (<TreeView Control>, <Child Path>,..
<Element>, <Level>, <Optional Parameter>)
The different parameters are as follows:
  • <TreeView Control> (character string with quotes):
    Name of TreeView control to use.
  • <Child Path> (character string):
    Full path of the "child" found (without the name) or an empty string ("") if it is the root of TreeView control. This parameter always ends with the "TAB" separator. This parameter will be initialized and filled whenever the procedure is called.
    Note: if the <Duplicate Identifier> parameter is set to True, the names of elements will contain the associated identifier if it exists. See Managing duplicates in the treeviews for more details.
  • <Element> (character string):
    Name of the element found. This parameter will be initialized and filled whenever the procedure is called.
  • <Level> (integer):
    Level of element found in relation to the initial search element:
    1. Direct child
    2. Grand child
    3. ...
  • <Optional Parameter> (integer):
    Value passed in <Custom Parameter> of TreeListItem. If <Custom Parameter> is not specified, <Custom Parameter> corresponds to the NULL constant.
Versions 20 and later
Note: This procedure can be an internal procedure.
New in version 20
Note: This procedure can be an internal procedure.
Note: This procedure can be an internal procedure.

Interrupting TreeListItem

TreeListItem cannot be interrupted as long as all "child" elements have not been browsed.
To force the interruption of the browse performed by TreeListItem, use the following code line in <Procedure Name>:
RESULT False
In this case, TreeListItem returns the number of elements browsed until the call to "RESULT False".
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