Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
When mixing tk.Checkbutton and ttk.Checkbutton (and maybe custom class Checkbutton)
tkinter behaves weirdly (calling method of one object changes the other too).
It is because ofname collision.
importtkinterastkfromtkinterimportttkwn=tk.Tk()tk.Checkbutton(wn)ttk.Checkbutton(wn)print(tk.Checkbutton(wn).winfo_name())print(ttk.Checkbutton(wn).winfo_name())
this example prints
!checkbutton2!checkbutton2This happens because oftk.Checkbutton._setup overriden method
which is not called in ttk.Checkbutton.
I think that that method can beerased, whichwould solve the problem,
but I'm not sure why it is there in the first place.
CPython versions tested on:
3.12
Operating systems tested on:
Windows