WOLFRAM

represents a checkbox with setting x, displayed as when x is True and when x is False.

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[x,{val1,val2}]

represents a checkbox that toggles between values val1 and val2 and displays as and , respectively.

Checkbox[x,{val1,val2,val3,}]

represents a checkbox that cycles through values vali and displays as for all vali with i>2.

Details and Options

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

The default states for Checkbox:

Out[1]=1

Using different values for states:

Out[1]=1

Scope  (3)Survey of the scope of standard use cases

By using Dynamic variables within Checkbox, the state variable is dynamically updated:

Out[1]=1

Here the value of x cycles through the list {1,2,3,4}:

Out[1]=1

Multiple checkboxes can share the same state variable:

Out[1]=1

Options  (8)Common values & functionality for each option

Appearance  (2)

Control the appearance of the checkbox:

Out[1]=1

Dynamically changing appearance:

Out[1]=1

AutoAction  (2)

By default, the checkbox does not change state until it is clicked:

Out[1]=1

By setting AutoAction, the checkbox changes state when the mouse moves over it:

Out[1]=1

Values will change as the cursor is moved over the clickable area:

Out[2]=2

BaselinePosition  (1)

Align with surrounding text:

Out[1]=1

Enabled  (2)

The Enabled option allows the checkbox to be changed:

Out[1]=1

The Enabled option can be changed dynamically for use in applications:

Out[1]=1

ImageMargins  (1)

Change the margins around the image:

Out[1]=1

Applications  (4)Sample problems that can be solved with this function

Use Checkbox to set variables corresponding to a three-way light switch:

Out[1]=1

Control options through checkboxes:

Out[1]=1
Out[2]=2

Use checkboxes to build a dynamic truth table:

Out[2]=2

Count the number of clicks in a Checkbox:

Out[1]=1

Properties & Relations  (1)Properties of the function, and connections to other functions

Checkbox is a special case of Toggler:

Out[1]=1
Out[2]=2
Wolfram Research (2007), Checkbox, Wolfram Language function, https://reference.wolfram.com/language/ref/Checkbox.html.
Wolfram Research (2007), Checkbox, Wolfram Language function, https://reference.wolfram.com/language/ref/Checkbox.html.

Text

Wolfram Research (2007), Checkbox, Wolfram Language function, https://reference.wolfram.com/language/ref/Checkbox.html.

Wolfram Research (2007), Checkbox, Wolfram Language function, https://reference.wolfram.com/language/ref/Checkbox.html.

CMS

Wolfram Language. 2007. "Checkbox." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Checkbox.html.

Wolfram Language. 2007. "Checkbox." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Checkbox.html.

APA

Wolfram Language. (2007). Checkbox. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Checkbox.html

Wolfram Language. (2007). Checkbox. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Checkbox.html

BibTeX

@misc{reference.wolfram_2025_checkbox, author="Wolfram Research", title="{Checkbox}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/Checkbox.html}", note=[Accessed: 04-June-2025 ]}

@misc{reference.wolfram_2025_checkbox, author="Wolfram Research", title="{Checkbox}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/Checkbox.html}", note=[Accessed: 04-June-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_checkbox, organization={Wolfram Research}, title={Checkbox}, year={2007}, url={https://reference.wolfram.com/language/ref/Checkbox.html}, note=[Accessed: 04-June-2025 ]}

@online{reference.wolfram_2025_checkbox, organization={Wolfram Research}, title={Checkbox}, year={2007}, url={https://reference.wolfram.com/language/ref/Checkbox.html}, note=[Accessed: 04-June-2025 ]}