- WLanguage procedure
- Interrupting TableListChild
TableListChild (Function) In french: TableListeFils 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.
// List the "children" of "Desserts" node in the "TVT_RecipeTV" TreeView Table control // The "ExpandAll" procedure is called for each "child" element found in the "Desserts" node nNbDesserts is int nNbDesserts = TableListChild(TVT_RecipeTV, "Recipes" + TAB + "Desserts", "ExpandAll")
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:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ... ["<Name of 2nd node>" + TAB + [...]]]"<Element name>"
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 <WLanguage procedure> (<TreeView Table control>, <Child branch>,.. <Element>, <Level>, <Optional parameter>)
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.
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>:
In this case, TableListChild returns the number of elements browsed until the call to "RESULT False". Business / UI classification: UI Code
This page is also available for…
|
|
|
|