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-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

WIDGET COMMAND

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

WIDGET STATES

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

STANDARD STYLES

76       Ttk::checkbutton  widgets  support the Toolbutton style in all standard
77       themes, which is useful for creating widgets for toolbars.
78

STYLING OPTIONS

80       The class name for a ttk::checkbutton is TCheckbutton.
81
82       Dynamic states: active, alternate, disabled, pressed,  selected,  read‐
83       only.
84
85       TCheckbutton styling options configurable with ttk::style are:
86
87       -background color
88       -compound compound
89       -foreground color
90       -indicatorbackground color
91       -indicatorcolor color
92       -indicatormargin padding
93       -indicatorrelief relief
94       -padding padding
95
96       Some options are only available for specific themes.
97
98       See  the ttk::style manual page for information on how to configure ttk
99       styles.
100

SEE ALSO

102       ttk::widget(n), ttk::radiobutton(n), checkbutton(n)
103

KEYWORDS

105       widget, button, toggle, check, option
106
107
108
109Tk                                    8.5                  ttk::checkbutton(n)
Impressum