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

class-grid

A class-grid is a specialized grid-widget subclass that makes it easier to create grids that edit instances of classes. Rather than defining row and column classes and then instantiating those classes and adding them to a grid-widget, you instead specify a single expression that parametrically describes the slots to be edited, and then the class-grid will automatically create grid columns for those slots. It will also automatically create grid rows for a set of instances when you set its value property to be a list of instances.

A class-grid always has a single body section with other sections for column and row headers, and there are other limitations to the style of the grid. In exchange for those limitations, a class-grid is much easier to set up than a general grid-widget.

Using a Class-Grid

To use a class-grid, there are three main properties that you need to set:

Other Class-Grid Properties

A class-grid has all of the properties of a grid-widget, but you shouldn't set the column-sections and row-sections properties because they are created automatically from the edited-slots property. Since you cannot specify properties of a class-grid's sections and subsections directly at creation time, some high-level properties are defined on the class-grid class itself that will affect its subobjects. These properties include:

For advanced use, after a class-grid has been created you could find the automatically created column and row sections and their subsections and modify them as with any other grid-widget. To do so, you may want to know that the two column-sections are named :header and :body (in that order), and so are the two row-sections. The single subsection of each header section is also named :header. The name of each column in the body is the name of the slot that it edits.

See also class-grid-top-pane and class-grid-drawing-pane.


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