Search code examples
pythonwxpython

the wx.EVT_MOTION event doesn't work for wxPython 4.0.6


the event wx.EVT_MOTION doesn't work for wxPython 4.0.6

self.Bind(wx.EVT_MOTION, self.OnMouseMotion, self.GetGridWindow())

with wxPython 3.0.2.0 the same binding worked. I also tried to bind other events e.g. EVT_MOUSEWHEEL for wxPython 4.0.6 and it worked. Does anyone know what changed in the version 4.0.6 and why the wx.EVT_MOTION isn't working anymore?


Solution

  • Does it change anything if you do:

    self.GetGridWindow().Bind(wx.EVT_MOTION, self.OnMouseMotion)

    ?