python - 'hover over' popup with Tkinter -


i have implemented informational popup in python app using tkinter menu widget. have text widget on canvas in root window. created menu widget has root parent. when detect mouse hover on text widget post popup menu menuwidget.post(). when leave event text widget intention have popup disappear calling menuwidget.unpost(), popup menu not disappear until click elsewhere outside text widget.

first, sane method implementing informational popup? , can tell me why popup menu won't disappear?

this not right way informational popup. on mac , on windows machines menus native controls. because of unpost command doesn't work because tk cedes control system event loop in order platform-specific behavior.

what want use instead toplevel window overrideredirect flag set. lets display borderless window anywhere want. upside aren't limited simple text -- can put want in toplevel -- text widget, canvas, buttons, etc.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -