ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Limits
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
Sorted is used to:
  • Determine if a control is sorted.
  • Sort a control.
WINDEV This property is available for the List Box, ListView and Combo Box controls populated programmatically.
WEBDEV - Server code This property is used to:
  • determine if the List Box and Combo Box populated programmatically are sorted.
  • determine if the Image, Clickable Image, and Thumbnail controls with automatic scroll are sorted.
  • sort the Image, Clickable Image, and Thumbnail controls with automatic scroll.
Remarks:
  • The Sorted option is used to sort the elements in the List Box or Combo Box control when it is displayed. If the control is sorted, the elements will be added (ListAdd) taking the sort into account (elements will be actually inserted).
  • For the ListView controls, the sort is performed according to the captions of the elements.
  • This option can be chosen in the window or page editor in the control description ("Details" tab, "Sorted list" option).
Example
ListAdd(LIST_List1, "CC")
ListAdd(LIST_List1, "DD")
ListAdd(LIST_List1, "BB")
LIST_List1.Sorted = True
// The order in the List Box control becomes BB, CC, DD
ListAdd(LIST_List1, "AA") // Will be inserted at the beginning of the list
Syntax

Determining if a control is sorted Hide the details

<Result> = <Control used>.Sorted
<Result>: Boolean
  • True if the specified control is sorted,
  • False otherwise.
<Control used>: Control name
Name of the control to be used:
  • Name of the List Box or ListView control.
  • Name of the Combo Box control.
  • WEBDEV - Server code Name of Image, Clickable Image or Thumbnail control with automatic scroll.

Sorting a control Hide the details

<Control used>.Sorted = <To sort>
<Control used>: Control name
Name of the control to sort:
  • WINDEV Name of the List Box or ListView control.
  • WINDEV Name of the Combo Box control.
  • WEBDEV - Server code Name of Image, Clickable Image or Thumbnail control with automatic scroll.
<To sort>: Boolean
  • True if the specified control must be sorted,
  • False otherwise.
Remarks

Limits

WINDEV The Sorted property applies only to List Box, ListView and Combo Box controls populated programmatically. The Sorted property does not apply to Table List Box and Combo Box controls.
WEBDEV - Server code The Sorted property applies only to:
  • List Box and Combo Box control populated programmaticallys.
  • Image, Clickable Image or Thumbnail controls with automatic scroll.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/02/2023

Send a report | Local help