|
|
|
|
- Interrupting TreeListItem
Parameters of the procedure used by TreeListItem Procedure ("Callback") called by TreeListItem for each "child" element found. This procedure can be a local, global or internal procedure. // List the "children" of the "Desserts" node in the "TREE_TVRecipe" TreeView // The "ExpandAll" procedure is called // for each "child" element found in the "Desserts" node Res is int Res = TreeListItem(TREE_TVRecipe, "Recipe" + TAB + "Dessert", TreeListItem_ExpandAll)   //-------------------------------------------------------------------------------------------- // Internal procedure "TreeListItem_ExpandAll" // This procedure expands all the collapsed "child" nodes of the "Desserts" node  INTERNAL PROCEDURE TreeListItem_ExpandAll(TREE_TVRecipe, ChildPath, ChildFound, ... Level, Pointer) // Is the element found a leaf? IF TreeTypeItem(TREE_TVRecipe, ChildPath + ChildFound) = tvLeaf THEN RETURN // Go back to the TreeListItem function ELSE // Is the element found collapsed? IF TreeStatus(TREE_TVRecipe, ChildPath + ChildFound) = tvCollapse THEN TreeExpand(TREE_TVRecipe, ChildPath + ChildFound) END END // Collapses the treeview TreeCollapse(TREE_TVRecipe, "Recipe") END Syntax
TreeListItem_Callback(<TreeView control> , <Child path> , <Element> , <Level> , <Optional parameter>)
<TreeView control>: Character string Name of the TreeView control to be used. <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. Remark: if the <Duplicate identifier> parameter of TreeListItem is set to True, the names of elements will contain the associated identifier if it exists. For more details, see Managing duplicates in the treeviews. <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, <Optional parameter> corresponds to the NULL constant. Remarks Interrupting TreeListItem TreeListItem cannot be interrupted as long as there are"child" elements to browse through. To force the interruption of the browse performed by TreeListItem, use the following line in the procedure: In this case, TreeListItem returns the number of elements browsed until "RESULT False" was called. Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|