tkinter: Why aren't my checkboxes checked by default? tkinter: Why aren't my checkboxes checked by default? tkinter tkinter

tkinter: Why aren't my checkboxes checked by default?


The problem is that your instances of IntVar are local variables. When they go out of scope they lose their value.

A simple fix is to add global checkbox_var inside of editionclick.


The problem is that checkbox_var is a local variable and it's getting carbage collected.

You can try:

self.checkbox_var = []person_checkboxes.append(Checkbutton(new_window, variable=self.checkbox_var[-1]))