I have created a list of 20 check buttons for my last application using Tkinter, but I can't figure out the way to check if a Checkbutton
is or not checked.
How do I check if a Checkbutton
is checked?
Take a look at this answer: Making Menu options with Checkbutton in Tkinter?
For each of the menu item, you need to create and associate a tk.BooleanVar()
that matches the status of the checkbox.
Since you have a lot of check buttons, you might want to create a list or dictionary to store these BooleanVars
and associate each of them with its own Checkbutton
.