Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolTip elevates main window when used in CTkToplevel window #18

Open
Dominik-esb opened this issue Dec 17, 2023 · 1 comment
Open

ToolTip elevates main window when used in CTkToplevel window #18

Dominik-esb opened this issue Dec 17, 2023 · 1 comment

Comments

@Dominik-esb
Copy link

Dominik-esb commented Dec 17, 2023

Senario:
main window -> button click -> create CTkToplevel window -> CTkRadioButton -> CTkToolTip for CTkRadioButton

When hovering over the RadioButton in the popup window, the main window gets elevated.
The ToolTip is displayed properly.
When closing the pop up window invalid command name error:

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/customtkinter/windows/widgets/core_rendering/draw_engine.py", line 137, in __draw_rounded_rect_with_border_polygon_shapes if not self._canvas.find_withtag("border_parts"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tkinter/__init__.py", line 2923, in find_withtag return self.find('withtag', tagOrId) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tkinter/__init__.py", line 2890, in find self.tk.call((self._w, 'find') + args)) or () ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ _tkinter.TclError: invalid command name ".!tabview.!ctktoplevel.!backupcreateview.!ctkframe.!canvas.!ctkscrollableframe.!ctkradiobutton52.!ctkcanvas2"

Screenshot 2023-12-17 at 19 29 42 Screenshot 2023-12-17 at 19 29 53
@samuelzamvil
Copy link

I was seeing similar behavior on macOS. Removing self.master from the following line or commenting it out completely resolved the issue for me. I'm not sure if this change will cause inadvertent side effects.

self.transient(self.master)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants