Theme change causes tcl error #5
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
snootic/applicatas-mutant#5
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Using theme_use() to change a theme using custom styles for Combox, Spinbox and Separator triggers _tkinter.TclError: Duplicate Element
Error
File "/usr/lib64/python3.11/tkinter/ttk.py", line 438, in element_create self.tk.call(self._name, "element", "create", elementname, etype, _tkinter.TclError: Duplicate element **element(can be TSpinbox.uparrow or TCombobox.downarrow for example)To reproduce:
In app.py Tela.trocar_tema()
window.style.theme_use(theme)In app.py Estilo.load_styles()
self.style.configure('custom.TCombobox', font=self.fonte, arrowsize=15) self.style.configure('custom.TSpinbox', font=self.fonte, arrowsize=15)The error occurs even without setting arrowsize
Most likely a issue with ttkbootstrap. I'm not solving it
Possible workaround:
Make theme changes only effective after restarting the app.