User Tools

Site Tools

Navigation:  ABC Library Reference > BrowseClass > BrowseClass Methods >====== SetSort (apply a sort order to the browse) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SetSort( order, force reset ), VIRTUAL, PROC


SetSort Applies a specified sort order to the browse list.
order An integer constant, variable, EQUATE, or expression that specifies the sort order to apply.
force reset A numeric constant, variable, EQUATE, or expression that tells the method whether to reset the browse conditionally or unconditionally. A value of zero (0 or False) resets the browse only if circumstances require (sort order changed, reset fields changed, first time loading); a value of one (1 or True) unconditionally resets the browse.

The SetSort method applies the specified sort order to the browse list and returns one (1) if the sort order changed; it returns zero (0) if the sort order did not change. Any range limits, locators, and reset fields associated with the sort order are enabled and applied.

The order value is typically a value returned by the AddSortOrder method which identifies the particular sort order. Since AddSortOrder returns sequence numbers, a value of one (1) applies the sort order specified by the first call to AddSortOrder; two (2) applies the sort order specified by the next call to AddSortOrder; etc. A value of zero (0) applies the default sort order.


The ResetSort method calls the SetSort method.

Return Data Type:     BYTE


IF FIELD() = ?FirstTab            !if first tab selected

 IF MyBrowse.SetSort(1,0)         !apply the first sort order

  MyBrowse.ResetThumbLimits       !if sort changed, reset thumb limits


 MyBrowse.UpdateBuffer            !update file buffer from selected item


See Also:     AddRange, AddResetField, AddSortOrder, ResetSort

setsort_apply_a_sort_order_to_the_browse_.htm.txt · Last modified: 2021/04/15 15:57 by