The class of a grid-widget control. This is a control containing an inner grid and acting much like a spreadsheet or table.
Control
An instance of the :grid-widget class. This is a rather complex control. It displays as a rectangular array of cells and can be used to implement applications such as spreadsheets.
A grid can have multiple sections of rows and columns, where each section may be independently scrolled and resized by dragging its border. The rows or columns within each section can also be resized as well as moved, selected, deleted and so on whenever each is specified to have those features. Rows and columns are collectively called subsections. Subsections may be added and removed programmatically at runtime.
Each section and subsection is implemented as a standard-object. An individual cell does not have a Lisp object to represent it, since these objects would increase quadratically, and is instead accessed via multimethods that specialize on the row and column whose intersection defines the cell.
Several predefined column classes implement pseudo-widgets such as
check-box
es,
combo-box
es,
and editable-text fields within their cells. Custom behavior can be
implemented in other cells by writing cell-click and draw-cell methods.
Typically, an application will associate a domain data object with each row of a grid. Each grid column will then have accessor methods that know how to access the particular attribute of a domain object that is displayed in that column. A framework for this is provided by the default column classes.
Adding a grid-widget control to your form
Click the grid-widget tool on the Component toolbar. Move the mouse cursor to the part of the form where you want to place the control, and click again. The control will appear with colored resizing handles.
Controls can only be resized and moved on forms during the design stage; the size and location of everything is fixed on a running form.
Resize the control by clicking the mouse cursor and dragging one of the handles to the new size-point. Release the mouse key when you are satisfied with the new size.
Resizing this control will change the size of the bounding box, i.e., the space in which the cells can be viewed. Resizing does not alter the height and width of the rows and columns as it sometimes does in a spreadsheet application.
Move the control by clicking anywhere on it except a resizing handle and dragging it to a new location on the form. Release the mouse key when you are ready to place the control.
Customizing the grid-widget
There is a complex example of using the grid widget in the Examples tab of the Navigator dialog, displayed with Help | Examples.
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.