Maplets[Elements]
BoxCell
specify a cell in a box column, box layout, or box row
Calling Sequence
Parameters
Description
Examples
BoxCell(opts)
opts
-
equation(s) of the form option=value where option is one of halign, hscroll, valign, value, or vscroll; specify options for the BoxCell element
The BoxCell layout element specifies an entry in a BoxColumn, BoxLayout, or BoxRow element. The contents of the cell are specified by using the value option.
For horizontal control in a box layout, use the BoxRow element. For vertical control in a box layout, use the BoxColumn element.
The BoxCell 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 BoxCell element can contain BoxLayout, GridLayout, BorderLayout, or window body elements to specify the value option.
A BoxCell element can be contained in a BoxColumn or BoxRow element, or Maplet element in a nested list representing a box layout.
The following table describes the control and use of the BoxCell 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
hscroll
valign
value
vscroll
The opts argument can contain one or more of the following equations that set Maplet options.
halign = left, center, right, or none
Horizontally aligns the cell when in a BoxRow. By default, the value is center. The none option can be used in combination with HorizontalGlue elements for finer control of the layout of cells in a row. For more detail, see BoxRow, and the example of this usage below.
hscroll = never, as_needed, or always
This option determines when a horizontal scroll bar appears in the box cell. By default, the value is never.
valign = top, center, bottom, or none
Vertically aligns the cell when in a BoxColumn. By default, the value is center. The none option can be used in combination with VerticalGlue elements for finer control of the layout of cells in a column. For more detail, see BoxColumn.
value = window body, BoxLayout, GridLayout, or BorderLayout element, or reference to such an element (name or string)
The Maplet element that appears in this cell.
vscroll = never, as_needed, or always
This option determines when a vertical scroll bar appears in the box cell. By default, the value is never.
A Maplet application in which element layout is controlled by using BoxCell elements.
with⁡MapletsElements:
maplet≔Maplet⁡BoxCell⁡Hello,right,BoxCell⁡Button⁡Quit,Shutdown⁡,left:
MapletsDisplay⁡maplet
A Maplet application in which the halign=none option is used in BoxCell elements in combination with HorizontalGlue to achieve better control over the location of objects.
maplet≔Maplet⁡BoxLayout⁡BoxColumn⁡BoxRow⁡BoxCell⁡Long text label to force alignment usage,BoxRow⁡BoxCell⁡Button⁡Left1,Shutdown⁡,halign=none,BoxCell⁡Button⁡Left2,Shutdown⁡,halign=none,HorizontalGlue⁡,BoxRow⁡BoxCell⁡Button⁡Left,Shutdown⁡,halign=none,HorizontalGlue⁡,BoxCell⁡Button⁡Right,Shutdown⁡,halign=none,BoxRow⁡HorizontalGlue⁡,BoxCell⁡Button⁡Right2,Shutdown⁡,halign=none,BoxCell⁡Button⁡Right1,Shutdown⁡,halign=none:
Note: This is different than the effect of using halight=left/right for the cells, as these options add space between consecutive elements with the same alignment.
See Also
Maplets/LayoutElements
Maplets/WindowBodyElements
Maplets[Display]
Maplets[Elements][BorderLayout]
Maplets[Elements][BoxColumn]
Maplets[Elements][BoxLayout]
Maplets[Elements][BoxRow]
Maplets[Elements][Button]
Maplets[Elements][GridLayout]
Maplets[Elements][Maplet]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
Download Help Document