1checkbutton(n) Tile Widget Set checkbutton(n)
2
3
4
6 ttk::checkbutton - On/off widget
7
9 ttk::checkbutton pathName ?options?
10
12 A checkbutton widget is used to show or change a setting. It has two
13 states, selected and deselected. The state of the checkbuton may be
14 linked to a Tcl variable. -class -compound -cursor -image
15 -state -style -takefocus -text -textvariable -under‐
16 line -width
17
19 [-command command] A Tcl script to execute whenever the widget is
20 invoked. [-offvalue offValue] The value to store in the associated
21 -variable when the widget is deselected. Defaults to 0. [-onva‐
22 lue onValue] The value to store in the associated -variable when the
23 widget is selected. Defaults to 1. [-variable variable] The name of a
24 global variable whose value is linked to the widget. Defaults to the
25 widget pathname if not specified.
26
28 In addition to the standard cget, configure, instate, and state com‐
29 mands, checkbuttons support the following additional widget commands:
30
31 pathname invoke
32 Toggles between the selected and deselected states and evaluates
33 the associated -command. If the widget is currently selected,
34 sets the -variable to the -offvalue and deselects the widget;
35 otherwise, sets the -variable to the -onvalue Returns the result
36 of the -command.
37
39 The widget does not respond to user input if the disabled state is set.
40 The widget sets the selected state whenever the linked -variable is set
41 to the widget's -onvalue, and clears it otherwise. The widget sets the
42 alternate state whenever the linked -variable is unset. (The alternate
43 state may be used to indicate a ``tri-state'' or ``indeterminate''
44 selection.)
45
47 widget(n), keynav(n), radiobutton(n)
48
50 widget, button, toggle, check, option
51
52
53
54tile 0.2 checkbutton(n)