ClassPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

column-selecting-row-mixin

A grid-row that is an instance of this class allows the user to select and/or move grid-columns by clicking the cells where they cross the grid-row. The selectable property of a column must also be true before the column may be interactively selected, and the movable property of a column must also be true before the column may be interactively moved. In other words, a column may be interactively selected at a particular cell if the column is a selectable one and the row at that cell is an instance of column-selecting-row-mixin; and (likewise) a column may be interactively moved (among the columns in its grid-column-section) at a particular cell if the column is a movable one and the row at that cell is an instance of column-selecting-row-mixin.

This feature is typically used only in a grid-row that serves as a set of column headers, so that the special column-selecting and/or -moving behavior does not override other cell-click behavior in the body of the grid-widget. Nevertheless, it may sometimes be desirable to use this class for multiple rows of a grid.

The user uses this feature by moving the mouse cursor into a cell in a selectable or movable   grid-column where it crosses a column-selecting-row-mixin row. The user may click and drag horizontally in this cell to reposition the grid-column, or click and release without moving the mouse more than *start-drag-slack* pixels to toggle the selected property of the column. When the mouse button is released after a drag, the column is positioned among the columns in its grid-column-section so that it is just to the right of all of the columns whose vertical centers are to the left of the final vertical center of the drag box (this should be intuitive). A drag may be canceled either by pressing the Escape key before releasing the mouse button or by releasing the mouse button while the drag box is positioned where the column would snap back to where it was already.

An individual selectable grid-column may be added to the current set of selected columns in its grid-column-section by holding down the control key while clicking the column; if the column is already selected, then this deselects the column instead. If the shift key is held down while clicking a selectable column, then the range of columns that just encompasses all of the columns that were already selected plus the column that was clicked are then left in a selected state (regardless of their selected state beforehand).

This class must be mixed with grid-row (or one of its subclasses) to make an instantiable class. It is best to specify such mixin classes ahead of the grid-row class in the list of superclasses for a new class, so that the small amount of special behavior from the mixin class will override the more general behavior of the grid-row class. For example:

(defclass my-column-selecting-row (column-selecting-row-mixin grid-row)())

The above default mouse click behavior may be overridden by custom cell-click methods.

For an example of column-selecting-row-mixin, see the Navigator dialog example (on the Examples tab) entitled "Grid-Widget: a basic replicated editable-text column". See also the class column-header-row, which combines this class with column-sizing-row-mixin and grid-row for use as a typical row of column headers.

See also slide-subsection.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version