The checkbutton and radiobutton widgets are associated with a global Tcl variable. When one of these buttons is clicked, a value is assigned to the Tcl variable. In addition, if the variable is assigned a value elsewhere in the program, the appearance of the checkbutton or radiobutton is updated to reflect the new value. A set of radiobuttons all share the same global variable. The set represents a choice among mutually exclusive options. In contrast, each checkbutton has its own global variable.
The ShowChoices example uses a set of radiobuttons to display a set of mutually exclusive choices in a user interface. The ShowBooleans example uses checkbutton widgets: