PyDocs

Nav

Graphical user interfaces with Tk

Checkbutton

tkinter

class
  • Checkbutton(master=None, cnf={}, **kw)
A Checkbutton widget displays a textual string, bitmap or image together with a square indicator, and toggles a boolean selection when pressed. It has all the behavior of a simple button and, in addition, can be selected: when selected the indicator is drawn with a check mark and the associated variable is set to the onvalue, and when deselected the indicator is drawn empty and the variable is set to the offvalue. Inherits from Widget. In addition to the standard widget options, a checkbutton accepts the options documented in the Tk checkbutton manual page, such as variable, onvalue, offvalue and command.
Members of Checkbutton

d

deselect
Deselect the checkbutton and set the associated variable to its offvalue.

f

flash
Flash the checkbutton by redisplaying it several times, alternating between the active and normal colors.

i

invoke
Do just what would happen if the user pressed the checkbutton with the mouse: toggle the selection state of the button and invoke the associated command, if there is one.

s

select
Select the checkbutton and set the associated variable to its onvalue.

t

toggle
Toggle the selection state of the button, redisplaying it and modifying its associated variable to reflect the new state.
0 Examples
No examples for tkinter/Checkbutton.
See Also
No see-alsos for tkinter/Checkbutton
0 Notes
No notes for Checkbutton