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

CTkTooltip on CTkCanvas #23

Open
PhilipNelson5 opened this issue May 1, 2024 · 0 comments
Open

CTkTooltip on CTkCanvas #23

PhilipNelson5 opened this issue May 1, 2024 · 0 comments

Comments

@PhilipNelson5
Copy link

PhilipNelson5 commented May 1, 2024

I tried to put a CTkTooltip on a CTkCanvas and it failed with this error

File ".venv\Lib\site-packages\CTkToolTip\ctk_tooltip.py", line 42, in __init__
    self.transparent_color = self.widget._apply_appearance_mode(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CTkCanvas' object has no attribute '_apply_appearance_mode'

I monkeyed around a little bit and was able to get it working by checking if hasattr(self.widget, _apply_appearance_mode). Is there a reason CTkToolTip can't be attached to a CTkCanvas?

For context, I'm using a small canvas to draw simple status "icons" (just colored circles) and want to use the tooltip to add more information as to why the status is a certain color. There may be a better way to accomplish this too.

@PhilipNelson5 PhilipNelson5 changed the title Tooltip on CTkCanvas CTkTooltip on CTkCanvas May 1, 2024
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

1 participant