December 2015
Beginner to intermediate
350 pages
6h 49m
English
In this recipe, we will add three Checkbutton widgets, each with a different initial state.
This recipe extends the previous recipes.
We are creating three Checkbutton widgets that differ in their states. The first is disabled and has a checkmark in it. The user cannot remove this checkmark as the widget is disabled.
The second Checkbutton is enabled and, by default, has no checkmark in it, but the user can click it to add a checkmark.
The third Checkbutton is both enabled and checked by default. The users can uncheck and recheck the widget as often as they like.
# Creating three checkbuttons # 1 chVarDis = tk.IntVar() # 2 check1 = tk.Checkbutton(win, text="Disabled", ...
Read now
Unlock full access