Maplets[Elements]
BoxRow
specify a row in a box layout
Calling Sequence
Parameters
Description
Examples
BoxRow(opts, element_content)
opts
-
equation(s) of the form option=value where option is one of background, border, caption, font, halign, hscroll, inset, spacing, valign, visible, or vscroll; specify options for the BoxRow element
element_content
any number of BoxCell, BoxColumn, or BoxRow elements
The BoxRow layout element specifies a row in a box layout.
Use BoxRow for horizontal control in a box layout.
The BoxRow 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
top or bottom
valign option
A BoxRow element can contain any number of BoxCell, BoxColumn, or BoxRow elements.
A BoxRow element can be contained in a BoxColumn, BoxLayout, or BoxRow element.
The following table describes the control and use of the BoxRow 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
hscroll
inset
spacing
valign
visible
vscroll
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 box row. 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 box has a border. By default, the value is false.
caption = string
The text that appears above the box row. 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.
halign = left, center, right, or none
Horizontally aligns the contents of the row. By default, the value is center.
Horizontal alignment of elements in a box row is accomplished by the addition of HorizontalGlue spacing elements: left alignment is obtained by adding a HorizontalGlue after the element, right alignment is obtained by adding a HorizontalGlue before the element, and center alignment is obtained by adding a HorizontalGlue both before and after the element. Choosing an alignment of none allows finer control by allowing specification of all HorizontalGlue elements manually (see examples/AdvancedMapletsLayout for more detail).
hscroll = never, as_needed, or always
This option determines when a horizontal scroll bar appears in the box row. By default, the value is never.
inset = nonnegint
The amount of padding that surrounds the elements in the box row. The default inset is 5 pixels.
spacing = nonnegint
The amount of padding that separates the individual elements in the box row. The default inset is 5 pixels.
valign = top, center, or bottom
Specifies the default vertical alignment for any BoxColumn layout objects contained in the row. By default, the value is center. The none option allows finer control of the alignment of contents when sed in combination with VerticalGlue (see BoxColumn for more detail).
Note: The valign option does not directly affect a box row object, but the specified valign value is inherited as the default vertical alignment for any BoxColumn elements it contains.
visible = true or false
Whether the box is visible to the user. By default, the value is true.
vscroll = never, as_needed, or always
This option determines when a vertical scroll bar appears in the box row. By default, the value is never.
with⁡MapletsElements:
maplet≔Maplet⁡Window⁡layout=BL1,BoxLayoutBL1⁡BoxColumn⁡BoxRow⁡Enter text:,TextFieldTF1⁡,Button⁡OK,Shutdown⁡TF1:
MapletsDisplay⁡maplet
This is identical to:
maplet≔Maplet⁡Enter text:,TextFieldTF1⁡,Button⁡OK,Shutdown⁡TF1:
A row of buttons with alignment handled manually using HorizontalGlue.
maplet≔Maplet⁡BoxLayout⁡BoxColumn⁡BoxRow⁡Label⁡This is a long line of text to force usage of the alignment for the buttons below,BoxRow⁡halign=none,Button⁡Left,Shutdown⁡,Button⁡NxtLeft,Shutdown⁡,HorizontalGlue⁡,Button⁡Mid,Shutdown⁡,HorizontalGlue⁡,Button⁡Right,Shutdown⁡:
See Also
examples/AdvancedMapletsLayout
Maplets/LayoutElements
Maplets[Display]
Maplets[Elements][BoxCell]
Maplets[Elements][BoxColumn]
Maplets[Elements][BoxLayout]
Maplets[Elements][Button]
Maplets[Elements][Font]
Maplets[Elements][HorizontalGlue]
Maplets[Elements][Maplet]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Elements][TextField]
Maplets[Elements][VerticalGlue]
Maplets[Elements][Window]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
plot[color]
Download Help Document