Hi Pedro,<br /><br />

a vktWidgetRepresentation has to be retrieved from the vtkWidget2 object. Then you can set position and size via it's bounds like so:<br />

<pre>  vtkSmartPointer&lt;vtkBoxWidget2&gt; boxWidget = vtkSmartPointer&lt;vtkBoxWidget2&gt;::New();
  boxWidget-&gt;SetInteractor(interactor);
  boxWidget-&gt;SetEnabled(<span style=' color: Maroon;'>1</span>);

  vtkWidgetRepresentation *boxRep = boxWidget-&gt;GetRepresentation();

  <span style=' color: Blue;'>double</span> bounds[] = {<span style=' color: Maroon;'>0</span>, <span style=' color: Maroon;'>5</span>, -<span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.5</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.5</span>, -<span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.5</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.5</span>};
  boxRep-&gt;PlaceWidget(bounds);
</pre>

It's some kind of funny having to do it like this.<br /><br />

with best regards<br />
Jochen

        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkBoxWidget2-initial-size-tp5713956p5713957.html">Re: vtkBoxWidget2 initial size</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>