My system:
Arch Linux x86_64
GTK+ 2.24.22
wxGTK 3.0.0
wxPython 3.0.0.0
After upgrading to wxPython 3.0.0.0 several widgets have lost native mouse wheel interaction, at least on my system: http://trac.wxwidgets.org/ticket/2623
Attached to this message you can find my attempt to reimplement the lost functionality for TextCtrl and ListCtrl, which are giving me a hard time:
-
with TextCtrl I’m using the ScrollWindow method, which gives me this error when scrolling the mouse wheel:
Traceback (most recent call last):
File “./test_mouse_wheel_workarounds.py”, line 48, in handle_mousewheel
self.ScrollWindow(dx=event.GetWheelRotation(), dy=0)
File “/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py”, line 11272, in ScrollWindow
return core.Window_ScrollWindow(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion “m_wxwindow != __null” failed at ./src/gtk/window.cpp(4680) in ScrollWindow(): window needs client area for scrolling -
with ListCtrl I’m using the ScrollList method, which just doesn’t work and doesn’t raise eny exceptions.
Any ideas? Thank you
test_mouse_wheel_workarounds.py (1.53 KB)