The core problem which made me search a way to identify if a choice/combo displays its drop-down list is in fact this:
EVT_LEAVE_WINDOW is not triggered within my app, so I try to simulate it by checking the values of m_mouseInWindow and IsMouseInWindow() in a manner similar to the one in the wxWindows sources (where the Enter and Leave events are generated). All this happens within a timer procedure.
Everything works fine, just that when the user's cursor is over a drop-down list of a choice/combo, IsMouseInWindow() returns false, as if the cursor left my frame.
The core problem which made me search a way to identify if a choice/combo displays its drop-down list is in fact this:
EVT_LEAVE_WINDOW is not triggered within my app, so I try to simulate it by checking the values of m_mouseInWindow and IsMouseInWindow() in a manner similar to the one in the wxWindows sources (where the Enter and Leave events are generated). All this happens within a timer procedure.
Everything works fine, just that when the user's cursor is over a drop-down list of a choice/combo, IsMouseInWindow() returns false, as if the cursor left my frame.
Any idea how to avoid this?
The problem is probably that the window used for the popup part of the combo does not follow the normal parenting rules and so the algorithm in IsMouseInWindow bails out without ever finding a match.
Perhaps you could just do something similar to but simpler than IsMouseInWindow. Just get the mouse position in screen coordinants, and compare that to the screen coordinants and size of the panel or frame you are working with?
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!