Maplets[Elements]
GridLayout
define a grid in a Maplet application
Calling Sequence
Parameters
Description
Examples
GridLayout(opts, element_content)
GridLayout[refID](opts, element_content)
opts
-
equation(s) of the form option=value where option is one of background, border, caption, font, halign, inset, reference, valign, or visible; specify options for the GridLayout element
element_content
any number of GridRow elements
refID
name or string; reference to the element
The GridLayout layout element defines a grid layout in a Maplet application. A grid layout is a rectangular layout in which all elements must appear within a rectangular grid.
The GridLayout 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
list of lists
operands are placed in GridRow ***
reference option
string or symbol
caption option
*** Each item inside a nested list (list of lists) is interpreted as a GridRow.
A GridLayout element can contain any number of GridRow elements.
A GridLayout element can be contained in a Maplet or Window element, or equation for the layout option in a Window element.
The following table describes the control and use of the GridLayout 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
background
x
border
caption
font
halign
inset
reference
valign
visible
The opts argument can contain one or more of the following equations that set Maplet application options.
background = color
The color of the highlights of the grid. This can be a recognized color name, an RGB color structure, or a string of the form "#RRGGBB" where each pair is a two-digit hexadecimal number.
border = true or false
Whether the grid has a border. By default, the value is false.
caption = string
The caption that appears on the grid. This option is valid only if the border option is set to true.
font = Font element or reference to a Font element (name or string)
The text font in the caption.
halign = left, center, right, or full
Default horizontal alignment of the contents of each GridCell in the layout (if no GridRow default exists).
inset = nonnegint
The amount of padding that surrounds the elements in the grid layout. The default inset is 0 pixels.
reference = name or string
A reference for the GridLayout element.
If the reference is specified by both an index, for example, GridLayout[refID], and a reference in the calling sequence, the index reference takes precedence.
valign = top, center, bottom, or full
Default vertical alignment of the contents of each GridCell in the layout (if no GridRow default exists).
visible = true or false
Whether the grid is visible to the user. By default, the value is true.
with⁡MapletsElements:
maplet≔Maplet⁡GridLayout⁡GridRow⁡GridCell⁡Hello,GridCell⁡Button⁡Quit,Shutdown⁡:
MapletsDisplay⁡maplet
This Maplet application is identical to:
maplet2≔Maplet⁡GridLayout⁡Hello,Button⁡Quit,Shutdown⁡:
MapletsDisplay⁡maplet2
See Also
Maplets/LayoutElements
Maplets[Display]
Maplets[Elements][BoxLayout]
Maplets[Elements][Button]
Maplets[Elements][Font]
Maplets[Elements][GridCell]
Maplets[Elements][GridRow]
Maplets[Elements][Maplet]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
plot[color]
Download Help Document