specify associated buttons - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Maplets : Elements : Other Elements : Maplets/Elements/ButtonGroup

Maplets[Elements][ButtonGroup] - specify associated buttons

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:

withMaplets[Elements]:

maplet:=MapletRadioButton'RB1'1,'value'=true,'group'='BG1',RadioButton'RB2'2,'value'=false,'group'='BG1',RadioButton'RB3'1,'value'=true,'group'='BG2',RadioButton'RB4'2,'value'=false,'group'='BG2',ButtonOK,Shutdown'RB1','RB2','RB3','RB4',ButtonCancel,Shutdown,ButtonGroup'BG1',ButtonGroup'BG2':

Maplets[Display]maplet

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


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam