ListBox.CompareRows Event
Returns a Boolean. The CompareRows event is useful for sorting a column of a ListBox in a manner that is not provided by the default mechanism.
Syntax
CompareRows ( Row1, Row2, Column, ByRef Result )
Parameters | |
Row1 |
|
Row2 |
|
Column |
|
ByRef Result |
The default mechanism sorts lexicographically. If you use the event, it gets called during a ListBox sort, e.g., when a user clicks in the header area.
Parameters:
Row1: Row number of one of the rows being compared.
Row2: Row number of the other row being compared.
Column: Number of column being sorted.
Result:
0 - If items in Row1 and Row2 in specified column are equal.
1 - Contents of Row1 > Contents of Row2.
-1 - Contents of Row2 > Contents of Row1.
Return True if the returned Result parameter is accurate for sorting.
Return False if you want REALbasic to use the default lexicographic sorting of the column.