Open alejandroautalan opened 2 years ago
You can fix this by also overriding the setter.
def __setitem__(self, key, val):
return self.configure(self, **{key: val})
I may not need these artifacts anymore and can comment them out. I went through a lot of iterations on the backend. But, I'll need to do some testing first. https://github.com/israel-dryer/ttkbootstrap/blob/2a298e6a3d80f499da142d978ed298eb349c739e/src/ttkbootstrap/style.py#L5000-L5011
Desktop (please complete the following information):
OS: Xubuntu 20.04 ttkbootstrap==1.7.4
Describe the bug
Hello. I'm trying to make my projects compatible with ttkbootstrap.
I have custom widgets that use the same "tkinter api style" for configuring widgets. I mean I override the methods "configure", "cget", etc, to add custom options. The current implementation of ttkbootstrap breaks all those custom widgets.
To Reproduce
This is an example of a custom widget:
placeholder.py:
If the program is run and the button clicked the following error is shown:
Expected behavior
ttkbootstrap overriding methods should call original methods that override.
For each overriden function (configure, cget, __getitem__, __setitem__), ttkboostrap should process its own options ('bootstyle', 'style') and for any other option, call the original function.
Screenshots
No response
Additional context
No response