ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / TreeView functions
  • Compatibility
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
<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>"
If there are two elements with the same name in the path, you can add the IDs of the elements (after their names using 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: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/24/2024

Send a report | Local help