Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how

Legacy Documentation

Mathematica 8 (2010)

This is documentation for Mathematica 8, which was
based on an earlier version of Wolfram Language.
View current documentation (Version 14.3)

Checkbox

Checkbox [x]
represents a checkbox with setting x, displayed as when x is True and when x is False .
Checkbox [Dynamic[x]]
takes the setting to be the dynamically updated current value of x, with the value of x being toggled if the checkbox is clicked.
Checkbox
represents a checkbox that toggles between values and , and displays as and respectively.
Checkbox
represents a checkbox that cycles through values , and displays as for all with i>2.
  • The following options can be given:
Appearance Automatic the overall appearance of the checkbox
AutoAction False whether to change the checkbox automatically when the mouse is over it
BaselinePosition Automatic alignment relative to surrounding text
Enabled Automatic whether the checkbox is enabled, or grayed out
ImageMargins 0 margins around the image of the displayed checkbox
(2)
The default states for Checkbox :
Using different values for states:
The default states for Checkbox :
Out[1]=
Using different values for states:
Out[1]=
(2)
By using Dynamic variables within Checkbox the state variable is dynamically updated:
Here the value of x cycles through the list :
(10)
Control the appearance of the checkbox:
Dynamically changing appearance:
By default, the checkbox does not change state until it is clicked:
By setting AutoAction , the checkbox changes state when the mouse moves over it:
Values will change as the cursor is moved over the clickable area:
Change the background color:
Dynamically change the background color:
Align with surrounding text:
The Enabled option allows the checkbox to be changed:
The Enabled option can be changed dynamically for use in applications:
Change the margins around the image:
(4)
Use Checkbox to set variables corresponding to a three-way light switch:
Control options through checkboxes:
Use checkboxes to build a dynamic truth table:
Count the number of clicks in a Checkbox :
(1)
Checkbox is a special case of Toggler :
New in 6


ja zh

AltStyle によって変換されたページ (->オリジナル) /