<div dir="ltr">Hello everyone.<div><br></div><div>I am currently using two vtkHandleWidget's in order to interactively modify the two end-points of a line using the mouse. By default the position of the vtkHandleWidget's cursor move by pressing the middle mouse button and dragging while the button is still being pressed. </div>
<div><br></div><div>What I am trying to do is use the left mouse button to translate the cursor but I do not know how to do this. I have tried modifying the event bindings using vtkWidgetEventTranslator but this has not worked.</div>
<div><br></div><div>Here is how I tried to change the event bindings:</div><div><br></div><div><div>//========================</div><div>vtkWidgetEventTranslator *eventTranslator = handleWidget->GetEventTranslator();</div>
<div>eventTranslator->RemoveTranslation( vtkCommand::LeftButtonPressEvent  );</div><div>eventTranslator->RemoveTranslation( vtkCommand::LeftButtonReleaseEvent  );</div><div>eventTranslator->RemoveTranslation( vtkCommand::MiddleButtonPressEvent  );</div>
<div>eventTranslator->RemoveTranslation( vtkCommand::MiddleButtonReleaseEvent  );</div><div>eventTranslator->SetTranslation( vtkCommand::LeftButtonPressEvent,  vtkWidgetEvent::Translate);</div><div>eventTranslator->SetTranslation( vtkCommand::LeftButtonReleaseEvent,  vtkWidgetEvent::EndTranslate);</div>
<div>//========================<br></div></div><div><br></div><div>After applying the code above the handle stops responding completely to any events from the Left and Middle mouse buttons and the remapping has no effect.</div>
<div><br></div><div>Can someone please give me some ideas on how to fix this?</div><div><br></div><div>Thanks for your help.</div></div>