Class | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## column-sizing-row-mixin

A `grid-row` that is an instance of this class allows the user to interactively change the width of `grid-column`s where they cross the `grid-row`. The resizable property of a column must also be true before interactive resizing is possible for that column. In other words, a column may be interactively resized at a particular cell if the column is a resizable one and the row at that cell is an instance of `column-sizing-row-mixin`.

This feature is typically used only in a row that serves as a set of column headers, so that the special column-sizing mouse cursor does not appear frequently as the user moves the mouse over the body of the grid (which might be distracting), and/or to prevent the user from inadvertantly resizing a column slightly if they click too near a cell's border when they mean to click in its interior. Nevertheless, it may sometimes be desirable to use this class for multiple rows, or even every row, of a grid.

The user uses this feature by moving the mouse cursor to the righthand border of a cell in a resizable column where it crosses a `column-sizing-row-mixin` row. The mouse cursor will change to indicate where resizing may be initiated; this area ranges from the rightmost edge of the border to `*grid-border-mouse-slack*` pixels to the left of that. The user may click and drag horizontally in this area to resize the `grid-column`. If the uniform-resizing property of the grid section is true, then all of the columns in the clicked `grid-column-section` will be sized to the specified size, though if the control key is held down then the behavior of the uniform-resizing property is reversed. The drag may be canceled either by pressing the Escape key before releasing the mouse button or by releasing the mouse button to the left of the left side of the column (which would otherwise makes its width be negative).

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-sizing-row (column-sizing-row-mixin grid-row)())

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

The width of a `grid-column` is stored as its section-size property. See also stretch-subsection.

See the `grid-widget` class for an overview of writing grid-widget code.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version