# How to pick widget inside square

**URL:** https://discourse.vtk.org/t/how-to-pick-widget-inside-square/12545
**Category:** vtk.js
**Tags:** web, vtkjs
**Created:** [October 26, 2023, 11:49am UTC](https://discourse.vtk.org/t/how-to-pick-widget-inside-square/12545 "2023-10-26T11:49:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Nosnickers](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nosnickers/32/7512_2.png) [@Nosnickers](https://discourse.vtk.org/u/Nosnickers)
#### Post date: [October 26, 2023, 11:49am UTC](https://discourse.vtk.org/t/how-to-pick-widget-inside-square/12545/1 "2023-10-26T11:49:13Z")

</div>

![cannotPickWidgetInsideSquare](https://discourse.vtk.org/uploads/default/original/2X/c/c839c37be1814d41eebbf2e618f842eecbfbd288.gif)  
Gif above shows that, when dragged lineWidget inside a square, the widget cannot be selected. How to select the actor or widget in this scenario, on account of more interaction with the widget.  
Any help will be appreciated.

Best Regards

---

<div class="post-metadata">

### Author: ![Nosnickers](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nosnickers/32/7512_2.png) [@Nosnickers](https://discourse.vtk.org/u/Nosnickers)
#### Post date: [November 1, 2023, 9:27am UTC](https://discourse.vtk.org/t/how-to-pick-widget-inside-square/12545/2 "2023-11-01T09:27:18Z")

</div>

After a dozens of days, I have tried cellpicker, hardwareSelector, but all in vain. Here [online code](https://stackblitz.com/edit/dyqwbp?file=src%2Fhardware-volume.vue,src%2FApp.vue,src%2Fimage-marching-cubes.vue,src%2Fcellpicker-volume-surface.vue) is everything I have so far.  
If the widget is outside other stl or volume, I can straightforwardly use widget interactionEvent. However, in my senario, I have to interact with widget inside other volume.  
Is there anyone can give some theory about how to drag widget out of vtkvolume. Thanks in advance.

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [November 1, 2023, 3:53pm UTC](https://discourse.vtk.org/t/how-to-pick-widget-inside-square/12545/3 "2023-11-01T15:53:38Z")

</div>

You need to make those other objects not part of the picking. I’m not sure if that is respected, but on the actor, you have a flag for disabling picking. Hopefully that will make them invisible for the picking part.

---

<div class="post-metadata">

### Author: ![Nosnickers](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nosnickers/32/7512_2.png) [@Nosnickers](https://discourse.vtk.org/u/Nosnickers)
#### Post date: [November 2, 2023, 12:55am UTC](https://discourse.vtk.org/t/how-to-pick-widget-inside-square/12545/4 "2023-11-02T00:55:24Z")

</div>

Dear Jourdain,  
I tried your suggest `actor.setPickable(false)`, it works like a charm! ☀  
You are so dependable and impressed. Thank you very much.  
Good luck, good work and sweet life.
