ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView Table functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the "children" of an element (lower level) in a TreeView Table control.
Example
// First "child" of first node in the "TVT_RecipeTV" control
Res is int
Res = TableGiveChild(TVT_RecipeTV, 1, taFirst)
WHILE Res <> -1
Trace(Res)
Res = TableGiveChild(TVT_RecipeTV, 1, taNext)
END
// Recursive procedure used to list all children
// of all parents from a row
PROCEDURE ListChildren(i=0)
j is int
// If no row number was passed as parameter,
// gets the index of selected row
IF i = 0 THEN i = TableSelect(TVT_MyTreeViewTable)
j = TableGiveChild(TVT_MyTreeViewTable, i, taFirst)
WHILE j <> -1
Info("Row: " + j + ", Code: " + COL_Code[j])
// Call the procedure by specifying
// the current row number
ListChildren(j)
j = TableGiveChild(TVT_MyTreeViewTable, i, taNext)
END
Syntax

Returning the child of an element by specifying the row number Hide the details

<Result> = TableGiveChild(<TreeView Table control> , <Row number> , <Child>)
<Result>: Integer
  • Number of the row for the "child" that was found,
  • -1 if no "child" is found.
<TreeView Table control>: Control name
Name of the TreeView Table control to be used.
<Row number>: Integer
Number of the row containing the branch to use.
<Child>: Constant
Indicates the requested "child".
taFirstFirst child element.
taNextNext child element.

Returning the child of an element by specifying its name Hide the details

<Result> = TableGiveChild(<TreeView Table control> [, <Element name>] , <Child>)
<Result>: Integer
  • Number of the row for the "child" that was found,
  • -1 if no "child" is found.
<TreeView Table control>: Control name
Name of the TreeView Table control to be used.
<Element name>: Optional 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.
<Child>: Constant
Indicates the requested "child".
taFirstFirst child element.
taNextNext child element.
Remarks
The runtime speed of syntax 1 is faster than the runtime speed of syntax 2.
Business / UI classification: UI Code
Component: wd290obj.dll
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help