I am trying to disable anchor point picking and dragging for a caption widget. I found this article on stack overflow:
The responses seem to indicate that the proposed solutions do not necessarily work. Is there a correct way to accomplish this?
I did try those suggestions, but they do not work.
I also tried the following without success:
If there are many (>10) captions in the scene eventually a green “+” cursor will appear in the scene and if you press the left mouse button and drag, one of the caption glyphs will move away from its anchor point. For some reasons, having transparency on seems to make it more likely to happen.
Did you try subclassing
vtkCaptionWidget? Most of
vtk*Widget classes are utility classes that have several VTK objects in them. So, you likely need to add some methods do disable the individual scene objects (e.g. the “+” handle) one-by-one. You can identify them by looking into the
this->HandleWidget->SetEnabled( 0 );
I hope this helps,
None of these methods were effective. EnableTranslationOff() is not defined in the version of VTK used in my company.
I also tried KeyPressActivationOff(), but it didn’t work either. After creating several captions, I hover over the arrows and sometimes a “hand” cursor appears. If I hold the mouse down, one of the caption vectors will start to move as I drag the mouse. Not even the one that the mouse was close to at the time.
Any other suggestions?