PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Returns the "children" of an element (lower level) in a TreeView Table control.
Versions 18 and later
Windows This function is now available for the WEBDEV sites in Windows.
Linux This function is now available for WEBDEV sites in Linux.
New in version 18
Windows This function is now available for the WEBDEV sites in Windows.
Linux This function is now available for WEBDEV sites in Linux.
Windows This function is now available for the WEBDEV sites in Windows.
Linux This function is now available for WEBDEV sites in Linux.
Example
// First "child" of first node in the "TVT_RecipeTV" control
Res is int
Res = TVT_RecipeTV.GiveChild(1, taFirst)
WHILE Res <> -1
Trace(Res)
Res = TVT_RecipeTV.GiveChild(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 in parameter,
// gets the subscript of selected row
IF i = 0 THEN i = TVT_MyTreeViewTable.Select()
j = TVT_MyTreeViewTable.GiveChild(i, taFirst)
WHILE j <> -1
Info("Row: " + j + ", Code: " + COL_Code[j])
// Call the procedure by specifying
// the current row number
ListChildren(j)
j = TVT_MyTreeViewTable.GiveChild(i, taNext)
END
Syntax

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

<Result> = <TreeView Table control>.GiveChild(<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 TreeView Table control to use.
<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> = <TreeView Table control>.GiveChild([<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 TreeView Table control to use.
<Element name>: Optional character string (with quotes)
Name of element to use. This parameter has the following format:
"<Name of root>" + 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.
Component : wd240obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment