RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBaseArray.SortOrder Property

Determines whether the array is sorted.

Pascal
property SortOrder: TSortOrder;
C++
__property TSortOrder SortOrder;

Set SortOrder to indicate whether the array should be sorted using the CompareProc property. When an array is sorted, all new items are added in the correct sort order position so as to maintain the sort order. SortOrder can have one of the following values:

Value 
Meaning 
TS_NONE  
The array is unsorted.  
TS_ASCENDING  
The elements of the array are sorted in ascending order.  
TS_DESCENDING  
The elements of the array are sorted in descending order.  

Setting the SortOrder property does not sort the items already in the array. If the array is not empty when the SortOrder property is changed to TS_ASCENDING or TS_DESCENDING, be sure to explicitly call the Sort method to sort the existing items.

Note: The Duplicates property has no effect when SortOrder is TS_NONE.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!