1ttk::checkbutton(n) Tk Themed Widget ttk::checkbutton(n)
2
3
4
5______________________________________________________________________________
6
8 ttk::checkbutton - On/off widget
9
11 ttk::checkbutton pathName ?options?
12______________________________________________________________________________
13
15 A ttk::checkbutton widget is used to show or change a setting. It has
16 two states, selected and deselected. The state of the checkbutton may
17 be linked to a Tcl variable.
18
20 -class -compound -cursor
21 -image -state -style
22 -takefocus -text -textvariable
23 -underline -width
24
25 See the ttk_widget manual entry for details on the standard options.
26
28 Command-Line Name:-command
29 Database Name: command
30 Database Class: Command
31
32 A Tcl script to execute whenever the widget is invoked.
33
34 Command-Line Name:-offvalue
35 Database Name: offValue
36 Database Class: OffValue
37
38 The value to store in the associated -variable when the widget
39 is deselected. Defaults to 0.
40
41 Command-Line Name:-onvalue
42 Database Name: onValue
43 Database Class: OnValue
44
45 The value to store in the associated -variable when the widget
46 is selected. Defaults to 1.
47
48 Command-Line Name:-variable
49 Database Name: variable
50 Database Class: Variable
51
52 The name of a global variable whose value is linked to the wid‐
53 get. Defaults to the widget pathname if not specified.
54
56 In addition to the standard cget, configure, identify, instate, and
57 state commands, checkbuttons support the following additional widget
58 commands:
59
60 pathname invoke
61 Toggles between the selected and deselected states and evaluates
62 the associated -command. If the widget is currently selected,
63 sets the -variable to the -offvalue and deselects the widget;
64 otherwise, sets the -variable to the -onvalue Returns the result
65 of the -command.
66
68 The widget does not respond to user input if the disabled state is set.
69 The widget sets the selected state whenever the linked -variable is set
70 to the widget's -onvalue, and clears it otherwise. The widget sets the
71 alternate state whenever the linked -variable is unset. (The alternate
72 state may be used to indicate a “tri-state” or “indeterminate” selec‐
73 tion.)
74
76 Ttk::checkbutton widgets support the Toolbutton style in all standard
77 themes, which is useful for creating widgets for toolbars.
78
80 ttk::widget(n), ttk::radiobutton(n), checkbutton(n)
81
83 widget, button, toggle, check, option
84
85
86
87Tk 8.5 ttk::checkbutton(n)