gnikit / tkinter-tooltip

A ToolTip widget for tkinter
https://gnikit.github.io/tkinter-tooltip
MIT License
41 stars 4 forks source link

Tooltip not visible when parent window has .wm_attributes('-topmost', True) #88

Closed erikwachters closed 6 months ago

erikwachters commented 9 months ago

Any chance you can add .wm_attributes('-topmost', True) to the tooltip itself?

ilopata1 commented 7 months ago

Faced the same problem and I was able to address simply with:

ToolTip(b, msg="Hover info").attributes('-topmost',True)
gnikit commented 7 months ago

I think the solution of @ilopata1 is what you should be doing when you want any widget to be at the top. Having explicit options for certain attributes, seems confusing to me. It might be worth adding a short example where .attributes('-topmost',True) is used.

gnikit commented 6 months ago

I am closing this since the expectation of the Tooltip widget vs other tkinter widgets are the same, i.e. if you want to be topmost you need to use .attributes('-topmost',True). This is one of the reasons why the tooltip itself inherits from the tkinter.TopLevel class.