Closed kev-a-s closed 4 years ago
does this have something to do with the __getattr__
in tkinter.Tk
?
No. I should have given steps to reproduce.
root = ThemedTk(theme='black', toplevel=True)
win = Toplevel(master=root)
Can be avoided by doing a config call after init instead of passing toplevel = True to constructor.
Hello! Thank you for opening this issue. This indeed appears to be a bug. Could you try the fix I applied in the fix
branch?
That works.
__init__toplevel
should be set before potential call toset_theme
.set_theme
can call_setup_toplevel_hook
, which will overwriteToplevel.__init__
before it has been saved. This leads to infinite recursion when aToplevel
is created.https://github.com/TkinterEP/ttkthemes/blob/82b848b7d3ca269c843df1b418b9132c744cc1da/ttkthemes/themed_tk.py#L66-L67