sort-column

Generic Function

Package: common-graphics

Arguments: grid-widget

When object is a grid-widget, returns (or sets with setf) the name of the column by which grid-widget will be sorted whenever sort-grid is called on it. Setf'ing the property does not sort the grid column. When object is a list-view, the name of the list-view-column by which the list-view is currently sorted. Setf'ing this property sorts the list-view by that column.

More on sorting grids: if the user right-clicks in a grid-cell which is both in a grid-column whose sortable property is true (this is the default) and also in a grid-row-section that has the row-section-with-sort-gadget-mixin, then that column will become the current sort-column of the grid-widget. The function sort-column may be used to retrieve or set the current sort-column of a grid-widget programmatically. If the grid-column's sortable property is nil and the user right-clicks it where it crosses a row-section-with-sort-gadget-mixin row-section, then a warning dialog is shown to indicate that that column is not sortable.

If a grid-row-section has the row-section-with-sort-gadget-mixin, then that section will display a sort gadget in its scroll-bar area. (The scrollbars property of this row-section should be nil so that the scrollbar does not cover the sort gadget --- this is typically not a problem if the sort gadget is put in a row-section that is used for headers, which is the recommended place for it.) If the user left-clicks the scroll-gadget, then the rows of the grid will be sorted by the current sort-column of the grid (using that column's sort-predicate). If no current sort column has been set yet, a warning dialog is shown. If the user right-clicks the sort gadget, then the sort order is reversed so that the next sort that is done will order the rows of the grid in the opposite order. The reversed sort order is indicated visually by an upside-down sort gadget. The property sort-reverse may be used to retrieve or set the current sort order of a grid-widget --- a value of nil indicates the "normal" sort order as specified by the grid-column's sort-predicate, while true indicates the opposite order). The function sort-grid may be used to sort a grid programmatically.

sort-column is a property of the grid-widget and list-view classes.

Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.