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

  

RadioButton

  

define a radio button

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

RadioButton(opts)

Parameters

opts

-

equation(s) of the form option=value where option is one of background, caption, enabled, font, foreground, group, image, reference, tooltip, value, or visible; specify options for the RadioButton element

Description

• 

The RadioButton window body element defines a radio button in a Maplet application.

  

 

• 

The RadioButton 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

 

 

Font element

font option

Image element

image option

string or symbol

caption option

true or false

value option

 

 

• 

A RadioButton element can contain a Font element to specify the font option, and an Image element to specify the image option.

• 

A RadioButton element can be contained in a Maplet or BoxLayout element, or Maplet element in a nested list representing a box layout.

• 

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

 

x

x

caption

x

 

x

x

enabled

x

 

x

x

font

x

 

x

x

foreground

x

 

x

x

group

x

x

 

 

image

x

 

 

x

reference

x

 

 

 

tooltip

x

 

x

x

value

x

 

x

x

visible

x

 

x

x

 

 

 

 

 

• 

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

  

 

  

background = color

  

The color of the highlights of the radio button.  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.

  

 

  

caption = string or symbol

  

The caption that appears to the right of the radio button.  The caption can have a mnemonic key or access key associated with it.  For more information, see Maplets Mnemonic Key.

  

 

  

enabled = true or false

  

Whether a radio button can be clicked.  If enabled is set to false, the radio button is dimmed, and any action associated with it cannot be initiated.  By default, the value is true.

  

 

  

font = Font element or reference to a Font element (name or string)

  

The font of the caption text.

  

 

  

foreground = color

  

The face color of the radio button.

  

 

  

group = reference to a ButtonGroup element (name or string)

  

A required option indicating the group to which the radio button belongs.

  

 

  

image = Image element or reference to an Image element (name or string)

  

An image associated with the radio button.

  

 

  

reference = name or string

  

A reference to the RadioButton element.

  

 

  

tooltip = string or symbol

  

The text that appears in the tooltip help window.

  

 

  

value = true or false

  

The value of the radio button.  By default, the value is false.

  

 

  

visible = true or false

  

Whether the radio button is visible to the user.  By default, the value is true.

Examples

This Maplet application displays two radio buttons grouped to allow the user to select only one.  On closing, it returns the state of the radio buttons.

withMapletsElements:

mapletMapletRadioButtonRB11,value=true,group=BG1,RadioButtonRB22,value=false,group=BG1,ButtonOK,ShutdownRB1,RB2,ButtonCancel,Shutdown,ButtonGroupBG1:

MapletsDisplaymaplet

See Also

Maplets Mnemonic Key

Maplets/CommandElements

Maplets/WindowBodyElements

Maplets[Display]

Maplets[Elements]

Maplets[Elements][Action]

Maplets[Elements][Button]

Maplets[Elements][ButtonGroup]

Maplets[Elements][Font]

Maplets[Elements][Image]

Maplets[Elements][Maplet]

Maplets[Elements][SetOption]

Maplets[Elements][Shutdown]

Maplets[Elements][ToggleButton]

Maplets[Tools][Get]

Maplets[Tools][Set]

Overview of Maplet Applications

plot[color]