Rename object internal repr, name // tkinter problem Rename object internal repr, name // tkinter problem tkinter tkinter

Rename object internal repr, name // tkinter problem


What you are asking for is not the proper solution to the problem you are having.

Checkbuttons are designed to be associated with one of the special tkinter variables (StringVar, IntVar, etc). If you don't give one, tkinter will create one for you using the name of the widget. Since you didn't give your widgets an explicit name, the last part of the widget named is "!checkbutton", and that's the name that tkinter uses for the variable. Thus, both checkbuttons end up sharing the same variable.

If you were to give your checkbuttons variables, your problem will go away.

...var1 = IntVar(value=0)chb.append(Checkbutton(win, text="test123", variable=var1))...var2 = IntVar(value=0)shop_chb.append(Checkbutton(tab_mp, text="test678", variable=var2))...