| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version |
A non-instantiable class that can be mixed with the grid-column
class to create grid
columns whose cells act like multi-line-editable-text
controls.
Each cell in the column will implement the pseudo-control if the row
of that cell is an instance of a grid-row
subclass that mixes in the
widget-row-mixin
class.
To ensure that this mixin class' methods take precedence over other
methods that specialize on grid-column
, this mixin class generally should
appear first in a defclass
expression's list of superclasses, as in:
(defclass my-editable-text-column (editable-text-column-mixin my-subclass-of-grid-column) ...)
The edit-start-trigger and edit-end-trigger
properties of the column may be used to determine what gesture the
user must make to initiate and complete the typing-in of a new value
for the cell. The user may press either the spacebar or the enter key
to emulate clicking on a cell in this column, and so that will
initiate type-in in the same cases that clicking will. This type
of column may also be given a template-string to restrict what the user may
enter. The scrollbars
property determines whether a vertical scrollbar will appear during
editing; when true (the default) a scrollbar will appear, and when
nil
it will not appear (to save space in the
cell).
When the user initiates type-in according to the edit-start-trigger property, the user is allowed to edit the string displayed in the cell. The user may then either press the escape key to cancel the edit, or accept the edit by pressing the enter key or by moving the keyboard focus out of the cell. If the edit is accepted and the text has changed, then the column's data-write-converter function is called to convert the typed string to a meaningful data object, which is then written by calling write-cell-value.
The read-cell-value method supplied by this mixin calls the column's data-read-converter to convert the actual domain data value represented by this cell into a string to be drawn in the cell. This string is also the initial string to be edited when the user initiates type-in.
See the section Built-In Grid Cell Widgets on the page for the
grid-widget
class for an
overview of the grid column mixins.
A quicker but less object-oriented alternative to using the widget-column-mixin
classes is to
write cell-widget methods.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version |