[vtkusers] generating EndInteractionEvent

David Doria daviddoria at gmail.com
Fri Dec 3 07:41:55 EST 2010


On Fri, Dec 3, 2010 at 1:40 AM, Liam Kurmos <quantum.leaf at googlemail.com> wrote:
>
> Hi All,
>
> I have a vtkSliderWidget
>
> isoSliderWidget->AddObserver(vtkCommand::EndInteractionEvent,sliderCallback);
>
> sometimes i want to set the slider to a particular value, and run the
> associated callback as though the user had moved the slider to that
> value.
> Can someone outline how to do this? / point me to an example ?
>
> cheers,
>
> Liam
>

Does this trigger the event?
sliderWidget->GetRepresentation()->SetValue(value);

If not you could probably do
sliderWidget->GetRepresentation()->SetValue(value);
sliderWidget->InvokeEvent(vtkCommand::EndInteractionEvent);

David



More information about the vtkusers mailing list