Maplets[Elements] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

Maplets[Elements]

  

VerticalGlue

  

specify spacing in a column of a box layout

 

Calling Sequence

Description

Examples

Calling Sequence

VerticalGlue()

Description

• 

The VerticalGlue layout element adds flexible spacing in its location in a BoxColumn of a box layout.

  

When a column is initially sized, any extra space not consumed by the visible elements is equally distributed to all VerticalGlue elements in that column. This includes any VerticalGlue elements that are implicitly defined through the valign argument for the BoxColumn or the elements of the BoxColumn.

  

When the row is resized (for example, by resizing the window) the change height of the BoxColumn is applied to the VerticalGlue elements equally when possible.

• 

The VerticalGlue layout element takes no additional options.

• 

A VerticalGlue element can only be contained in a BoxColumn element, and is most useful when the BoxColumn has been specified with valign=none, allowing greater control of spacing of the elements within the column.

Examples

Alignment with valign.

withMapletsElements:

mapletMapletBoxLayoutBoxColumnTextBoxheight=10,width=8,This is a tall narrow text box to force additional space so the alignment of the buttons on the right is relevant,BoxColumnBoxCellButtonQuit1,Shutdown,valign=top,BoxCellButtonQuit2,Shutdown,valign=bottom:

MapletsDisplaymaplet

Same alignment using VerticalGlue.

mapletMapletBoxLayoutBoxColumnTextBoxheight=10,width=8,This is a tall narrow text box to force additional space so the alignment of the buttons on the right is relevant,BoxColumnvalign=none,ButtonQuit1,Shutdown,VerticalGlue,ButtonQuit2,Shutdown:

MapletsDisplaymaplet

Example with three buttons that is only possible with halign=none and VerticalGlue.

mapletMapletBoxLayoutBoxColumnTextBoxheight=10,width=8,This is a tall narrow text box to force additional space so the alignment of the buttons on the right is relevant,BoxColumnvalign=none,ButtonQuit1,Shutdown,ButtonQuit2,Shutdown,VerticalGlue,ButtonQuit3,Shutdown:

MapletsDisplaymaplet

Example where enlarging the window will cause the buttons to remain on the top.

mapletMapletBoxLayoutBoxColumnvalign=none,ButtonQuit1,Shutdown,ButtonQuit2,Shutdown,VerticalGlue:

MapletsDisplaymaplet

Example where enlarging the window will cause the buttons to remain on opposite ends of the window.

mapletMapletBoxLayoutBoxColumnvalign=none,ButtonQuit1,Shutdown,VerticalGlue,ButtonQuit1,Shutdown:

MapletsDisplaymaplet

See Also

Maplets/LayoutElements

Maplets[Display]

Maplets[Elements]

Maplets[Elements][BoxCell]

Maplets[Elements][BoxColumn]

Maplets[Elements][BoxLayout]

Maplets[Elements][BoxRow]

Maplets[Elements][HorizontalGlue]

Maplets[Elements][Maplet]

Overview of Maplet Applications