Maplets[Elements]
CheckBox
define a check box
Calling Sequence
Parameters
Description
Examples
CheckBox(opts)
CheckBox[refID](opts)
opts
-
equation(s) of the form option=value where option is one of background, caption, enabled, font, foreground, image, onchange, reference, tooltip, value, or visible; specify options for the CheckBox element
refID
name or string; reference to the element
The CheckBox window body element defines a check box in a Maplet application.
The CheckBox 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
Action or command elements
onchange option
Font element
font option
reference option
string or symbol
caption option
true or false
value option
A CheckBox element can contain Action or command elements to specify the onchange option, a Font element to specify the font option, and an Image element to specify the image option.
A CheckBox 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 CheckBox 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
caption
enabled
font
foreground
image
onchange
reference
tooltip
value
visible
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 check box. 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
The caption that appears on the check box. 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 check box can be selected. If enabled is set to false, the check box 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 check box text.
foreground = color
The color of the check box face.
image = Image element or reference to an Image element (name or string)
A reference to an Image element.
onchange = Action or command element, or reference to an Action element (name or string)
The action that occurs when the value of the check box is changed.
reference = name or string
A reference for the CheckBox element.
If the reference is specified by both an index, for example, CheckBox[refID], and a reference in the calling sequence, the index reference takes precedence.
tooltip = string or symbol
The text that appears in the tooltip help window.
value = true or false
Whether the check box is selected. By default, the value is false.
visible = true or false
Whether the check box is visible to the user. By default, the value is true.
A Maplet application that prompts the user to select any combination of 'red', 'white', and 'blue':
with⁡MapletsElements:
maplet≔Maplet⁡CheckBoxChB1⁡caption=red,CheckBoxChB2⁡caption=white,CheckBoxChB3⁡caption=blue,Button⁡OK,Shutdown⁡ChB1,ChB2,ChB3,Button⁡Cancel,Shutdown⁡:
MapletsDisplay⁡maplet
See Also
Maplets Mnemonic Key
Maplets/CommandElements
Maplets/WindowBodyElements
Maplets[Display]
Maplets[Elements][Action]
Maplets[Elements][Button]
Maplets[Elements][Font]
Maplets[Elements][Image]
Maplets[Elements][Maplet]
Maplets[Elements][SetOption]
Maplets[Elements][Shutdown]
Maplets[Tools][Get]
Maplets[Tools][Set]
Overview of Maplet Applications
plot[color]
Download Help Document