sorted

Type: Boolean

Availability: Read or write at any time

The sorted property specifies whether the elements of a ComboBox or ListBox control are automatically sorted alphabetically.

The settings of the sorted property are listed in the following table.

Value List items are …
true Sorted alphabetically (case-insensitive). This is the default value for a ComboBox control.
false Not sorted alphabetically. This is the default value for a ListBox control.

When the sorted property is set to true, the control manages the entries and the sorting process. The sortAsc property controls whether the entries are sorted in ascending or descending order, and the sortCased property controls whether the sorting is case-sensitive.

Using the addItem method to add an element to a specific location in the list may violate the sort order, and subsequent additions may not be correctly sorted.

Setting the sorted property for a list box control sets the hasPictures, hasPlusMinus, and hasTreeLines properties to false.