ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView Table functions
  • WLanguage procedure
  • Interrupting TableListChild
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Lists the "children" of a node and the "child" elements of these "children" in a TreeView Table control. A WLanguage procedure is called whenever a "child" element is found.
Example
// Liste les "fils" du noeud "Desserts" dans le champ Table hiérarchique "TABLEH_RecetteTV"
// La procédure "DérouleTout" est appelée pour chaque "fils" trouvé du noeud "Desserts"
nNbDesserts is int 
nNbDesserts = TableListChild(TABLEH_RecetteTV, "Recettes" + TAB + "Desserts", "DérouleTout")
Syntax

Listing the children of a branch identified by its path Hide the details

<Result> = TableListChild(<TreeView Table control> , <Element name> , <WLanguage procedure> [, <Custom parameter>])
<Result>: Integer
Number of listed elements.
<TreeView Table control>: Control name
Name of the TreeView Table control to be used.
<Element name>: Character string
Name of the element to be used. This parameter has the following format:
"<Nom de la racine>" + TAB + ["<Nom du 1er noeud>" + TAB + ...
["<Nom du 2ème noeud>" + TAB + [...]]]"<Nom de l'élément>"
A WLanguage error occurs if this parameter does not correspond to an existing element.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure that will be called whenever a "child" element is found.
<Custom parameter>: Optional integer
Parameter passed to the procedure <Procedure name>.

Listing the children of a branch identified by its index Hide the details

<Result> = TableListChild(<TreeView Table control> , <Row number> , <WLanguage procedure> [, <Custom parameter>])
<Result>: Integer
Number of listed elements.
<TreeView Table control>: Control name
Name of the TreeView Table control to be used.
<Row number>: Integer
Number of the row corresponding to the branch to use.
<WLanguage procedure>: Procedure name
Name of WLanguage procedure that will be called whenever a "child" element is found.
<Custom parameter>: Optional integer
Parameter passed to <WLanguage procedure>.
Remarks

WLanguage procedure

The <WLanguage procedure> is called whenever a "child" element is found. This procedure is a WLanguage procedure.
This procedure must be declared as follows:
PROCEDURE <Procédure WLangage> (<Champ Table hiérarchique>, <Branche du fils>,..
<Élément>, <Niveau>, <Paramètre optionnel>)
The different parameters are as follows:
  • <TreeView Table control> (character string):
    Name of the TreeView Table control to be used.
  • <Child branch> (character string):
    Full path of "child" found (without the name) or an empty string ("") if it is the root of TreeView Table control. This parameter always ends with the "TAB" separator. This parameter will be initialized and filled whenever the procedure is called.
  • <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 TableListChild. If <Custom parameter> is not specified, <Custom parameter> corresponds to the NULL constant.
Note: This procedure can be a internal procedure.

Interrupting TableListChild

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

Last update: 09/21/2024

Send a report | Local help