Maplets[Elements]
BorderLayout
define a border layout
Calling Sequence
Parameters
Description
Examples
BorderLayout(opts, element_content)
BorderLayout[refID](opts, element_content)
opts
-
equation(s) of the form option=value where option is one of background, border, caption, font, hgap, inset, reference, vgap, or visible; specify options for the BorderLayout element
element_content
at most 5 uniquely constrained GridCell2 elements
refID
name or string; reference to the element
The BorderLayout layout element defines a border layout in a Maplet application. A border layout is a layout scheme in which you can add an element for each of the four compass directions or centered.
In a BorderLayout, the GridCell2 elements it contains each specify their constraint, which can be one of east, west, north, south, or center. No two GridCell2 elements in the same BorderLayout can have the same constraint.
The BorderLayout 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
reference option
string or symbol
caption option
A BorderLayout element can contain at most 5 uniquely constrained GridCell2 elements.
A BorderLayout 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 BorderLayout 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
hgap
inset
reference
vgap
visible
The opts argument can contain one or more of the following equations that set Maplet options.
background = color
The color of the highlights of the border layout. 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 table has a border. By default, the value is false.
caption = string
The text that appears above the border layout. The caption is visible only if the option border is set to true.
font = Font element or reference to a Font element (name or string)
The text font in the caption.
hgap = nonnegint
Specifies the amount of padding between the horizontally arranged GridCell2 elements, specifically the west, center, and east elements.
inset = nonnegint
The amount of padding that surrounds the elements in the border layout. The default inset is 5 pixels.
reference = name or string
A reference for the BorderLayout element.
If the reference is specified by both an index, for example, BorderLayout[refID], and a reference in the calling sequence, the index reference takes precedence.
vgap = nonnegint
Specifies the amount of padding between the vertically arranged GridCell2 elements, specifically the north and south elements and the set of west, center, and east elements contained between them.
visible = true or false
Whether the table is visible to the user. By default, the value is true.
with⁡MapletsElements:
maplet≔Maplet⁡Window⁡layout=BL1,BorderLayoutBL1⁡vgap=5,GridCell2⁡constraint=north,Label⁡halign=left,This is a small window,GridCell2⁡constraint=west,Enter text:,GridCell2⁡constraint=east,TextFieldTF1⁡,GridCell2⁡constraint=south,Button⁡OK,Shutdown⁡TF1:
MapletsDisplay⁡maplet
See Also
Maplets/LayoutElements
Maplets[Display]
Maplets[Elements][Button]
Maplets[Elements][Font]
Maplets[Elements][GridCell2]
Maplets[Elements][Maplet]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Elements][TextField]
Maplets[Elements][Window]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
plot[color]
Download Help Document