|
Calling Sequence
|
|
GridCell(opts)
|
|
Parameters
|
|
opts
|
-
|
equation(s) of the form option=value where option is one of halign, height, hscroll, hweight, valign, value, vscroll, vweight, or width; specify options for the GridCell element
|
|
|
|
|
Description
|
|
•
|
The GridCell layout element specifies an entry in a row of a grid layout.
|
•
|
The contents of the cell are specified by using the value option.
|
•
|
The GridCell element features can be modified by using options. To simplify specifying options in the Maplets package, certain options and contents can be set without using an equation. The following table lists elements, symbols, and types (in the left column) and the corresponding option or content (in the right column) to which inputs of this type are, by default, assigned.
|
Elements, Symbols, or Types
|
Assumed Option or Content
|
|
|
always, as_needed, or never
|
hscroll and vscroll options
|
left or right
|
halign option
|
string or symbol
|
value option
|
top or bottom
|
valign option
|
|
|
|
|
•
|
A GridCell element can contain BoxLayout, GridLayout, or window body elements to specify the value option.
|
•
|
A GridCell element can only be contained in a GridRow element.
|
•
|
The following table describes the control and use of the GridCell element options.
|
|
An x in the I column indicates that the option can be initialized, that is, specified in the calling sequence (element definition).
|
|
An x in the R column indicates that the option is required in the calling sequence.
|
|
An x in the G column indicates that the option can be read, that is, retrieved by using the Get tool.
|
|
An x in the S column indicates that the option can be written, that is, set by using the SetOption element or the Set tool.
|
Option
|
I
|
R
|
G
|
S
|
|
|
|
|
|
halign
|
x
|
|
|
|
height
|
x
|
|
|
|
hscroll
|
x
|
|
|
|
hweight
|
x
|
|
|
|
valign
|
x
|
|
|
|
vscroll
|
x
|
|
|
|
vweight
|
x
|
|
|
|
value
|
x
|
|
|
|
width
|
x
|
|
|
|
|
|
|
|
|
|
|
•
|
The opts argument can contain one or more of the following equations that set Maplet application options.
|
|
halign = left, center, right, or full
|
|
Horizontal alignment of the cell contents. By default, the value is inherited from either the parent GridRow, or if unset, the parent GridLayout, or if unset then defaults to center. The value full, rather than aligning the cell contents, attempts to horizontally stretch the cell contents to fill the cell.
|
|
The number of grid rows the cell spans. By default, the value is 1.
|
|
Note: The height parameter does not control the height of its content, only its position.
|
|
hscroll = never, as_needed, or always
|
|
This option determines when a horizontal scroll bar appears in the grid cell. By default, the value is never.
|
|
hweight = integer in the range 0..10
|
|
This option specifies the amount of stretch to apply to the column the GridCell appears in when the GridLayout is horizontally resized. A value of 0 (the default) corresponds to no stretching, while a value of 10 (the maximum) corresponds to full stretching. The stretch value for a column in a GridLayout is taken to be the maximum stretch value for all GridCell elements in that column.
|
|
valign = top, center, bottom, or full
|
|
Vertical alignment of the cell contents. By default, the value is inherited from either the parent GridRow, or if unset, the parent GridLayout, or if unset then defaults to center. The value full, rather than aligning the cell contents, attempts to vertically stretch the cell contents to fill the cell.
|
|
value = window body, BoxLayout, or GridLayout element, or reference to such an element (name or string)
|
|
The Maplet application element that appears in the grid cell.
|
|
vscroll = never, as_needed, or always
|
|
This option determines when a vertical scroll bar appears in the grid cell. By default, the value is never.
|
|
vweight = integer in the range 0..10
|
|
This option specifies the amount of stretch to apply to the row the GridCell appears in when the GridLayout is vertically resized. A value of 0 (the default) corresponds to no stretching, while a value of 10 (the maximum) corresponds to full stretching. The stretch value for a row in a GridLayout is taken to be the maximum stretch value for all GridCell elements in that row.
|
|
The number of grid cells that the cell spans. By default, the value is 1.
|
|
Note: The width parameter does not control the width of its content, only its position.
|
|
|
Examples
|
|
Alignment example:
Using height and width:
Similar layout using bottom row for vertical resize and center column for horizontal resize with multi-line buttons and using 'full' alignment
|
|
|