Box Cell - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Maplets[Elements]

  

BoxCell

  

specify a cell in a box column, box layout, or box row

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

BoxCell(opts)

Parameters

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

Description

• 

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

x

 

 

 

valign

x

 

 

 

value

x

 

 

 

vscroll

x

 

 

 

 

 

 

 

 

• 

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.

Examples

A Maplet application in which element layout is controlled by using BoxCell elements.

withMapletsElements:

mapletMapletBoxCellHello,right,BoxCellButtonQuit,Shutdown,left:

MapletsDisplaymaplet

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.

mapletMapletBoxLayoutBoxColumnBoxRowBoxCellLong text label to force alignment usage,BoxRowBoxCellButtonLeft1,Shutdown,halign=none,BoxCellButtonLeft2,Shutdown,halign=none,HorizontalGlue,BoxRowBoxCellButtonLeft,Shutdown,halign=none,HorizontalGlue,BoxCellButtonRight,Shutdown,halign=none,BoxRowHorizontalGlue,BoxCellButtonRight2,Shutdown,halign=none,BoxCellButtonRight1,Shutdown,halign=none:

MapletsDisplaymaplet

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]

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