Button Group - 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]

  

ButtonGroup

  

specify associated buttons

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

ButtonGroup(opts)

ButtonGroup[refID](opts)

Parameters

opts

-

equation(s) of the form option=value where option is one of onchange or reference; specify options for the ButtonGroup element

refID

-

name or string; reference to the element

Description

• 

The ButtonGroup element associates radio and toggle buttons so that at most one in the group can be selected.

• 

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

 

 

refID

reference option

 

 

• 

A ButtonGroup element cannot contain other elements.

• 

A ButtonGroup element can be contained in a Maplet element.

• 

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

 

 

 

 

 

onchange

x

 

 

 

reference

x

 

 

 

 

 

 

 

 

• 

The opts argument can contain one or more of the following equations that set Maplet application options.

  

 

  

onchange = Action or command element, or reference to an Action element (name or string)

  

The action that occurs when the selected RadioButton in the ButtonGroup is changed.

  

 

  

reference = name or string

  

A reference for the ButtonGroup element.

  

If the reference is specified by both an index, for example, ButtonGroup[refID], and a reference in the calling sequence, the index reference takes precedence.

Examples

A Maplet application with two distinct button groups:

withMapletsElements:

mapletMapletRadioButtonRB11,value=true,group=BG1,RadioButtonRB22,value=false,group=BG1,RadioButtonRB31,value=true,group=BG2,RadioButtonRB42,value=false,group=BG2,ButtonOK,ShutdownRB1,RB2,RB3,RB4,ButtonCancel,Shutdown,ButtonGroupBG1,ButtonGroupBG2:

MapletsDisplaymaplet

See Also

Maplets/OtherElements

Maplets[Display]

Maplets[Elements]

Maplets[Elements][Button]

Maplets[Elements][Maplet]

Maplets[Elements][RadioButton]

Maplets[Elements][SetOption]

Maplets[Elements][Shutdown]

Maplets[Elements][ToggleButton]

Maplets[Tools][Get]

Maplets[Tools][Set]

Overview of Maplet Applications