[vtkusers] Mouse wheel events not working with vtkInteractorStyleUser
elvis.stansvik at orexplore.com
Fri Jun 17 06:43:19 EDT 2016
>From what I've read, vtkInteractorStyleUser is still the canonical way to
do completely custom interaction behavior from Python, by observing the
events of the interactor.
But running this minimal test case:
from vtk import vtkRenderWindow
from vtk import vtkRenderWindowInteractor
from vtk import vtkInteractorStyleUser
from vtk import vtkCommand
def onLeftButtonPressEvent(sender, event):
print('left button press')
def onMouseWheelForwardEvent(sender, event):
interactorStyle = vtkInteractorStyleUser()
renderWindow = vtkRenderWindow()
interactor = vtkRenderWindowInteractor()
It seems that wheel events are not supported by vtkInteractorStyleUser?
Scrolling the wheel forwards prints nothing, while pressing the left mouse
button prints "left button press" as expected.
What should I do if I want to provide completely custom interaction from
Python, and still be able to handle wheel events?
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers