EVT_ENTER_WINDOW while LeftIsDown()

Vadim Zeitlin vadim at wxwidgets.org
Thu Apr 3 05:57:59 PDT 2008


On Thu, 3 Apr 2008 12:00:12 +0300 Eran Ifrah <eran.ifrah at gmail.com> wrote:

EI> OS: Linux, Ubuntu 7.10
EI> WX: 2.87 Unicode Monolithic
EI> 
EI> In my application, if have several classes derived from wxPanel placed
EI> inside a vertical sizer.
EI> 
EI> Each derived class, handles the following mouse events:
EI> 
EI> EVT_ENTER_WINDOW
EI> EVT_LEAVE_WINDOW
EI> EVT_LEFT_UP
EI> EVT_LEFT_DOWN
EI> 
EI> When the mouse left button is pressed - I correctly receive the
EI> EVT_LEFT_DOWN event, but if I now start to move the cursor to the next
EI> window in the sizer while the left button is still pressed, the event
EI> EVT_ENTER_WINDOW is never captured. However, the EVT_LEAVE_WINDOW is
EI> properly captured.

 What do you do in your EVT_LEFT_DOWN handler? In particular, do you call
event.Skip() or not?

EI> Of course this works correctly if the mouse is not being pressed while
EI> entering the Window.
EI> 
EI> The problem occurs only on Linux, on Windows it works fine.
EI> 
EI> Any ideas?

 I suspect that the mouse could be captured by the default handler but it's
just this, an idea, unencumbered by any experimental confirmation.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/



More information about the wx-users mailing list