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
Moves the content of a row as well as its entire descending tree structure in a TreeView Table control.
Example
// Positions the content of branch 1
// as child of branch 19 in the TreeView Table control
TableMoveBranch(TVT_Customer, 1, 19, tmInChild)
// Positions the content of "My Documents\To Do" branch
// as child of branch 1 in the TreeView Table control
TableMoveBranch(TVT_FOLDERS, "My documents" + TAB + ...
"To do", 1, tmInChild)
// Positions the content of branch 1 as root of the TreeviewTable control
TableMoveBranch(TVT_Customer, 1, Null, tmInChild)
Syntax
<Result> = TableMoveBranch(<TreeView Table control> , <Element to move> , <Destination element> , <Type of move>)
<Result>: Integer
Actual position at which the row was moved. This position is equal to the subscript of the row destination only if the destination is before the source in the TreeView Table control.
<TreeView Table control>: Control name
Name of the TreeView Table control to be used.
If this parameter corresponds to an empty string (""), the control to which the current event belongs will be used.
<Element to move>: Integer or character string
Branch to move. This branch can be identified:
  • by the index of the branch to move. This index must be between 1 and the number of control rows (returned by the TableCount function or the Count property).
  • by the path of the element to move. This parameter has the following format:
    "<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
    ["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
<Destination element>: Integer or character string
Destination branch. This branch can be identified:
  • by the index of the destination branch. This index must be between 1 and the number of control rows (returned by the TableCount function or the Count property).
  • by the path of the destination element. This parameter has the following format:
    "<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
    ["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
  • by 'Null' or empty string ("") to specify the root of the tree structure.
<Type of move>: Boolean constant
Type of move to perform:
tmInChildThe branch is moved and it will be the first child of destination branch. The branch moved will be positioned one level below the destination branch in the hierarchy.
tmInSiblingThe branch is moved and it will be the next sibling of the destination branch. The branch moved will be positioned on the same hierarchy level as the destination branch but at the following position.
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help