wxDataViewCtrl consumes mouse-move event (win32)
Description
We'd like to hi-light the item under mouse. It works fine on linux/gtk, but does not on windows.
Expected vs observed behaviour:
wxDataViewCtrl* view;
...
view->Bind(wxEVT_MOTION, &Panel::OnMouseMove, this);
the callback in invoked on linux, but non on windows.
Platform and version information
wxWidgets-3.2.5 (MSW)
Have you tried binding to the event on view->GetMainWindow()?
Thank you, it works, indeed. However, then wxEVT_LEAVE_WINDOW cannot be catch via it (it works on windows, and does not work on linux)
Under Linux GetMainWindow() is the same thing as wxDataViewCtrl itself, so do you mean that wxEVT_LEAVE_WINDOW doesn't work at all for you with wxGTK?
Here is a minimal example. On windows it prints "leaving" in the console, while on linux/gtk it is silent.
What I mean is that removing GetMainWindow() from this example probably doesn't make it work neither. So it's a rather different problem from the one originally reported and which, I suspect, might not even be specific to wxDVC.
well, while this can be different problem from wx perspective, I solve the following problem: hilight an item while mouse is hovering over it, i.e. when mouse is moving around hilight an item and unhilight previous, and when mouse is leaving the area, then unhilight last item.
I'd expect just to do 2 binds (mouse move and mouse leaving) and implement that.
Anyway, thank as a lot for helping. The GetMainWindow() solves half of the my problem!