# vtkSplineWidget2 not pickable or read only

**URL:** https://discourse.vtk.org/t/vtksplinewidget2-not-pickable-or-read-only/4015
**Category:** Support
**Created:** [August 18, 2020, 6:04pm UTC](https://discourse.vtk.org/t/vtksplinewidget2-not-pickable-or-read-only/4015 "2020-08-18T18:04:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [August 18, 2020, 6:04pm UTC](https://discourse.vtk.org/t/vtksplinewidget2-not-pickable-or-read-only/4015/1 "2020-08-18T18:04:23Z")

</div>

Is there any method to setup vtkSplineWidget2 as not pickable ? I have tried following methods:

```
	pSplineRepresentation->DragableOff();
	pSplineRepresentation->ClosedOff();
	pSplineRepresentation->PickableOff();

```

However, I still can to drag and move the spline widget. Here is the entire code:

```
if (NULL == m_pSpline->GetInteractor())
{
	m_pSpline->SetInteractor(m_pInteractor);
	m_pSpline->SetCurrentRenderer(m_pRenderer);

	m_pSpline->CreateDefaultRepresentation();	// create default representation
	vtkSplineRepresentation* pSplineRepresentation = vtkSplineRepresentation::SafeDownCast(m_pSpline->GetRepresentation());
	pSplineRepresentation->SetNumberOfHandles(5);
	pSplineRepresentation->SetHandlePosition(0, 0, 0, 0);
	pSplineRepresentation->SetHandlePosition(1, 0.1, 0.1, 0.1);
	pSplineRepresentation->SetHandlePosition(2, 0.5, 0.5, 0.5);
	pSplineRepresentation->SetHandlePosition(3, 0.8, 0.8, 0.8);
	pSplineRepresentation->SetHandlePosition(4, 10, 10, 10);
	pSplineRepresentation->SetLineColor(0.9, 0.3, 0.3);
	pSplineRepresentation->GetLineProperty()->SetLineWidth(4);
	pSplineRepresentation->DragableOff();
	pSplineRepresentation->PickableOff();
	pSplineRepresentation->BuildRepresentation();
	vtkSplineWidgetCallback* pCallback = vtkSplineWidgetCallback::New();
	pCallback->SetView(this);
	m_pSpline->AddObserver(vtkCommand::StartInteractionEvent, pCallback);
	m_pSpline->AddObserver(vtkCommand::InteractionEvent, pCallback);
	m_pSpline->AddObserver(vtkCommand::EndInteractionEvent, pCallback);
	pCallback->Delete();
}

```

I have used wrongly these methods: _DragableOff_, _ClosedOff_, _PickableOff_ ? Or is referring to something else ?

---

<div class="post-metadata">

### Author: ![flaviu2](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/f/74df32/32.png) [@flaviu2](https://discourse.vtk.org/u/flaviu2)
#### Post date: [August 20, 2020, 3:58pm UTC](https://discourse.vtk.org/t/vtksplinewidget2-not-pickable-or-read-only/4015/2 "2020-08-20T15:58:07Z")

</div>

I noticed in VTK github that _DragableOff_ and _PickableOff_ is called as actors, never as widgets … should I work with vtkSplineWidget2 as actor in order to run successfully _PickableOff_ ? But how ?
