wxPython MouseWheel events seen at grid but not at ScrolledWindow

wxPython MouseWheel events seen at grid but not at ScrolledWindow
Using Widget Inspection Tool

Widget Tree
GUIFrame
--ScrolledWindow -- not receiving EVT_MOUSEWHEEL or EVT_SCROLLWIN_LINEUP/DOWN
----BoxSizer
------BoxSizer
--------StaticText
--------Grid
----------Window (panel)
----------Window (panel)
----------Window (panel)
----------Window (grid window)
------BoxSizer
--------StaticText
--------Grid
----------Window (panel)
----------Window (panel)
----------Window (panel)
----------Window (grid window) -- seems to be catching the events but not handling them or skipping

By toggling Watch on the EventWatcher window for the above Grid it is possible to get the main frame to react correctly.

What should I be reading/studying to progress this?
Regards,
Peter Bobroff

Peter Bobroff wrote:

wxPython MouseWheel events seen at grid but not at ScrolledWindow
Using Widget Inspection Tool

Widget Tree
GUIFrame
--ScrolledWindow -- not receiving EVT_MOUSEWHEEL or EVT_SCROLLWIN_LINEUP/DOWN
----BoxSizer
------BoxSizer
--------StaticText
--------Grid
----------Window (panel)
----------Window (grid window)
------BoxSizer
--------StaticText
--------Grid
----------Window (panel)
----------Window (grid window) -- seems to be catching the events but not handling them or skipping

There are a couple issues at work here. First, the mouse events are not command events, so they will not be propagated up to parent widows. (See self.Bind vs. self.button.Bind - wxPyWiki) Second, the mouse wheel events will behave a little differently depending on platform. On Windows only the focused window will receive wheel events. On the other platforms the cursor only needs to be within the bounds of the window to be scrolled and the window needs to not be obscured by child widgets at the position of the cursor.

···

--
Robin Dunn
Software Craftsman