views:

191

answers:

1

Hi everyone!
I have a frame with a textctrl. When the mouse enters the textctrl (EVT_ENTER_WINDOW) I show a PopupWindow on top of the textctrl, and when the mouse leaves the popup (EVT_LEAVE_WINDOW) I hide it again.

Everything works fine, except when inside the PopupWindow there's a ScrolledWindow with shown scrollbars. The EVT_LEAVE_WINDOW gets fired when I move the mouse on top of a scrollbar, so it looks like wxPython thinks the scrollbars are not part of the scrolledwindow.. :/ I tried binding the event to the popup or the scrollwindow itself, but nothing changes.. Is there a way I could get around this?

Many thanks!

(wxPython 2.8.8.0 on Xubuntu 8.10)

A: 

Since tooltips normally disappear when the user moves the mouse you could also bind to EVT_MOTION instead of EVT_LEAVE_WINDOW and hide the tooltip when the user moves the mouse.

Frank Niessink
Well in my case the popup is somewhat more complex that a tooltip, so I can't dismiss it on mouse move.. Anyway thanks for your time :)
Joril