1ttk::checkbutton(n)            Tk Themed Widget            ttk::checkbutton(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       ttk::checkbutton - On/off widget
9

SYNOPSIS

11       ttk::checkbutton pathName ?options?
12_________________________________________________________________
13

DESCRIPTION

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

STANDARD OPTIONS

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

WIDGET-SPECIFIC OPTIONS

28       [-command command]  A  Tcl  script  to  execute  whenever the widget is
29       invoked.  [-offvalue offValue] The value to  store  in  the  associated
30       -variable  when  the  widget  is  deselected.   Defaults to 0.  [-onva‐
31       lue onValue] The value to store in the associated  -variable  when  the
32       widget is selected.  Defaults to 1.  [-variable variable] The name of a
33       global variable whose value is linked to the widget.  Defaults  to  the
34       widget pathname if not specified.
35

WIDGET COMMAND

37       In  addition  to  the  standard cget, configure, identify, instate, and
38       state commands, checkbuttons support the  following  additional  widget
39       commands:
40
41       pathname invoke
42              Toggles between the selected and deselected states and evaluates
43              the associated -command.  If the widget is  currently  selected,
44              sets  the  -variable  to the -offvalue and deselects the widget;
45              otherwise, sets the -variable to the -onvalue Returns the result
46              of the -command.
47

WIDGET STATES

49       The widget does not respond to user input if the disabled state is set.
50       The widget sets the selected state whenever the linked -variable is set
51       to the widget's -onvalue, and clears it otherwise.  The widget sets the
52       alternate state whenever the linked -variable is unset.  (The alternate
53       state  may  be used to indicate a “tri-state” or “indeterminate” selec‐
54       tion.)
55

SEE ALSO

57       ttk::widget(n), ttk::radiobutton(n), checkbutton(n)
58

KEYWORDS

60       widget, button, toggle, check, option
61
62
63
64Tk                                    8.5                  ttk::checkbutton(n)
Impressum