Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Moderately revised from 8.0.
8.0 version

proportional

Arguments: grid-section-any

Returns the value of the proportional property of its argument. The default value is t for a grid-row-section or grid-column-section, and nil for a grid-row or grid-column.

This property determines whether space will be distributed among a grid-section and its siblings. When a grid-row-section or grid-column-section is resized, any grid-rows or grid-columns in that section that have their proportional property turned on are also resized proportionally to each other as needed in order to keep the section exactly filled by its set of subsections (when possible). For example, if a grid-column-section has six columns, and the two columns that are proportional have sizes (widths) of 100 and 200, and the user stretches that grid section by 30 pixels, then the two proportional columns will also stretch to become 110 and 220 pixels wide.

Similarly, when the whole grid-widget is resized, any grid-column-sections or grid-row-sections within it that have their proportional property turned on are also resized as needed in order to keep the grid exactly filled by its sections (and any of their proportional subsections are resized in turn).

It is advisable to make at least one grid-row-section and at least one grid-column-section of any grid-widget be proportional, so that the sections always fill the grid.

Typically, if a grid-section contains only one subsection, it is desirable to make that subsection be proportional so that it always fills its section.

Grid-sections that have no proportional subsections will be scrollable when the fixed sizes of the subsections exceeds the whole section size, as long as the section's scrollbars property is turned on. (It will also scroll even if it contains proportional subsections if the size of the non-proportional subsections exceeds the section size.)

proportional is a property of the grid-subsection, grid-column, row-header-column, grid-row, column-header-row, grid-section, grid-column-section, and grid-row-section classes.

Compatibility note: through version 8.0, the default value was t for all classes. We decided that this was confusing for rows and columns, because it is typically more useful to create them at a size that fits their content rather than making them stretch or shrink to fit the parent grid-section (when the section is not scrollable). If an application does not specify this property for some grid-row or grid-column instances and it depends on the value to be true, then :proportional t initargs should be added to the calls to make-instance that create the rows and columns.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
This page has had moderate revisions compared to the 8.0 page.
Created 2007.4.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Moderately revised from 8.0.
8.0 version