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