ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
  • Compatibility
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
Sorts the elements found in a TreeView control.
Example of TreeView control:
Vocabulary linked to a TreeView control
Example
// Sort the elements found in the "TREE_TVRecipe" TreeView control
// Alphabetical sort from the "Desserts" node
Res = TreeSort(TREE_TVRecipe, "Recipes" + TAB + "Desserts", tvUp)
Syntax
<Result> = TreeSort(<TreeView control> [, <Path of source element> [, <Type of sort>]])
<Result>: Boolean
  • True if the sort was performed,
  • False if the specified source element does not exist.
Java After the call to TreeSort, all the branches of the TreeView control are automatically collapsed.
<TreeView control>: Control name
Name of TreeView control to sort.
<Path of source element>: Optional character string
Full path of element from which the sort will be performed. If this parameter corresponds to the NULL constant or if it is not specified, the sort is performed on all elements found in the TreeView control. This parameter has the following format:
"<Root name>" + TAB + ["<Name of 1st node>" + TAB + ...
["<Name of 2nd node>" + TAB + [...]]]"<Leaf name>"
In case of duplicates on a path element, this path can contain the element identifier (specified at the end of its name by TreeID).
<Type of sort>: Optional constant
Type of sort to perform.
tvDownSort in reverse alphabetical order.
tvUp
(Default value)
Sort in alphabetical order.
Remarks

Compatibility

For compatibility with previous versions, both TreeSort and TreeSort_55 are supported.
Component: wd290obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help