# vtkBoxWidget change handles behavior

**URL:** https://discourse.vtk.org/t/vtkboxwidget-change-handles-behavior/4344
**Category:** Support
**Created:** [October 3, 2020, 3:24pm UTC](https://discourse.vtk.org/t/vtkboxwidget-change-handles-behavior/4344 "2020-10-03T15:24:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![panicbuttonvfx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/panicbuttonvfx/32/1838_2.png) [@panicbuttonvfx](https://discourse.vtk.org/u/panicbuttonvfx)
#### Post date: [October 3, 2020, 3:24pm UTC](https://discourse.vtk.org/t/vtkboxwidget-change-handles-behavior/4344/1 "2020-10-03T15:24:08Z")

</div>

Hi,

Is it possible to change vtkBoxWidget handle’s behavior? I’d like to have the widget to either rotate or move locked on the axis of the handle I’m dragging (instead of resizing the box).

Thanks!

---

<div class="post-metadata">

### Author: ![panicbuttonvfx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/panicbuttonvfx/32/1838_2.png) [@panicbuttonvfx](https://discourse.vtk.org/u/panicbuttonvfx)
#### Post date: [February 15, 2021, 12:42am UTC](https://discourse.vtk.org/t/vtkboxwidget-change-handles-behavior/4344/2 "2021-02-15T00:42:19Z")

</div>

Hi,

I’d like to bump up this thread to see if anybody knows of a way to constraint the transformation of a vtkBoxWidget. For instance, when dragging on it with the mouse, I’d like to lock its rotation to one axis only. Is that possible?

Thanks!

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [February 15, 2021, 12:07pm UTC](https://discourse.vtk.org/t/vtkboxwidget-change-handles-behavior/4344/3 "2021-02-15T12:07:27Z")

</div>

I do not believe vtkBoxWidget supports this. If you are ambitious, the vtkHandleWidget handles translation constraints … you could learn from this class and integrate something similar to vtkBoxWidget.

---

<div class="post-metadata">

### Author: ![panicbuttonvfx](https://discourse.vtk.org/user_avatar/discourse.vtk.org/panicbuttonvfx/32/1838_2.png) [@panicbuttonvfx](https://discourse.vtk.org/u/panicbuttonvfx)
#### Post date: [February 17, 2021, 2:30pm UTC](https://discourse.vtk.org/t/vtkboxwidget-change-handles-behavior/4344/4 "2021-02-17T14:30:12Z")

</div>

Thanks Will. Taking at initial look, it eventually led me to the [vtkAxesTransformWidget](https://vtk.org/doc/nightly/html/classvtkAxesTransformWidget.html#details) component, which looks like what I’m looking for, but I haven’t been able to make it work (or work like it’s supposed to based on its description). Anybody has any information or examples of it? Thanks!
