Maplets[Elements] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Maplets : Elements : Layout Elements : Maplets/Elements/BoxColumn

Maplets[Elements]

  

BoxColumn

  

specify a column in a box layout

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

BoxColumn(opts, element_content)

Parameters

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 BoxColumn element

element_content

-

any number of BoxCell, BoxColumn, or BoxRow elements

Description

• 

The BoxColumn layout element specifies a column in a box layout.

• 

Use BoxColumn for vertical control in a box layout.

• 

The BoxColumn 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 BoxColumn element can contain any number of BoxCell, BoxColumn, or BoxRow elements.

• 

A BoxColumn element can be contained in a BoxColumn, BoxLayout, or BoxRow element.

• 

The following table describes the control and use of the BoxColumn 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

x

 

 

 

caption

x

 

 

 

font

x

 

 

 

halign

x

 

 

 

hscroll

x

 

 

 

inset

x

 

 

 

spacing

x

 

 

 

valign

x

 

 

 

visible

x

 

 

 

vscroll

x

 

 

 

 

 

 

 

 

• 

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 column.  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 column.  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

  

Specifies the default horizontal alignment for any BoxRow layout objects contained in the column. By default, the value is center. The none option allows finer control of the alignment of contents when used in combination with HorizontalGlue (see BoxRow for more detail).

  

Note: The halign option does not directly affect a box column object, but the specified halign value is inherited as the default horizontal alignment for any BoxRow elements it contains.

  

 

  

hscroll = never, as_needed, or always

  

This option determines when a horizontal scroll bar appears in the box column.  By default, the value is never.

  

 

  

inset = nonnegint

  

The amount of padding that surrounds the elements in the box column. The default inset is 5 pixels.

  

 

  

spacing = nonnegint

  

The amount of padding that separates the individual elements in the box column.  The default inset is 5 pixels.

  

 

  

valign = top, center, bottom, or none

  

Vertically aligns the contents of the column. By default, the value is center.

  

Vertical alignment of elements in a box column is accomplished by the addition of VerticalGlue spacing elements: top alignment is obtained by adding a VerticalGlue below the element, bottom alignment is obtained by adding a VerticalGlue above the element, and center alignment is obtained by adding a VerticalGlue both above and below the element. Choosing an alignment of none allows finer control by allowing specification of all VerticalGlue elements manually (see examples/AdvancedMapletsLayout for more detail).

  

 

  

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 column.  By default, the value is never.

Examples

withMapletsElements:

mapletMapletWindowlayout=BL1,BoxLayoutBL1BoxColumnBoxRowEnter text:,TextFieldTF1,ButtonOK,ShutdownTF1:

MapletsDisplaymaplet

This Maplet application is identical to:

mapletMapletEnter text:,TextFieldTF1,ButtonOK,ShutdownTF1:

MapletsDisplaymaplet

A column of buttons with alignment handled manually using VerticalGlue. Note that the specified 'halign' value has no effect, as the Maplet application contains no BoxRow elements.

mapletMapletBoxLayoutBoxColumnhalign=left,valign=none,ButtonVery top,Shutdown,ButtonNext to top,Shutdown,VerticalGlue,ButtonCloser to top buttons than bottom,Shutdown,VerticalGlue,VerticalGlue,ButtonVery bottom,Shutdown:

MapletsDisplaymaplet

To left align the buttons in the above Maplet application, each object must be contained in a BoxRow.

mapletMapletBoxLayoutBoxColumnhalign=left,valign=none,BoxRowButtonVery top,Shutdown,BoxRowButtonNext to top,Shutdown,VerticalGlue,BoxRowButtonCloser to top buttons than bottom,Shutdown,VerticalGlue,VerticalGlue,BoxRowButtonVery bottom,Shutdown:

MapletsDisplaymaplet

See Also

examples/AdvancedMapletsLayout

Maplets/LayoutElements

Maplets[Display]

Maplets[Elements]

Maplets[Elements][BoxCell]

Maplets[Elements][BoxLayout]

Maplets[Elements][BoxRow]

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]