[vtk-developers] Making vtkScalarBarWidget interactive

Paul Harris harris.pc at gmail.com
Thu Aug 11 06:06:00 EDT 2011


Hi,

I was trying to use vtkScalarBarWidget,
and it took me a long long time to figure out how to enable the widget so I
can drag it around.

I searched the mailing lists and internet for relevant questions, and found
a dozen or more posts with the question,
but no answers.

>From the scalarbar documentation, it looks like all you need to do is call
widget->SetRepositionable(1);
which isn't actually required because that is set on by default.
The only test for this class does not make the bar interactive.

The solution is that you need to read the vtkBorderWidget documentation, and
call
widget->SetSelectable(1)

Then the widget will become interactive and you can drag it around, etc.
If you want to only be able to Resize it, then you call
widget->SetRepositionable(0);
but leave Selectable on.

I would like to see a note to that affect in the vtkScalarBarWidget
documentation, in the SetRepositionable() method documentation.
If some simple comment was there, then it would've saved me quite some time.

Regards,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110811/2846d3fb/attachment.html>


More information about the vtk-developers mailing list