# How can i set the length of the linewidget in vtk.js?

**URL:** <https://discourse.vtk.org/t/how-can-i-set-the-length-of-the-linewidget-in-vtk-js/8583>\
**Category:** Development\
**Created:** [May 25, 2022, 1:05am UTC](https://discourse.vtk.org/t/how-can-i-set-the-length-of-the-linewidget-in-vtk-js/8583 "2022-05-25T01:05:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sneha-pk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sneha-pk/32/4216_2.png) [@Sneha-pk](https://discourse.vtk.org/u/Sneha-pk)\
**Post date:** [May 25, 2022, 1:05am UTC](https://discourse.vtk.org/t/how-can-i-set-the-length-of-the-linewidget-in-vtk-js/8583/1 "2022-05-25T01:05:23Z")

</div>

Hello everyone,  
I am trying to develop a fixed horizontal line using vtkLineWidget(as i need the functionality to drag it across). I am using the setOrigin() method for both handles to set the length of the line but the handles are still active after placing the handle at the set origin. Is there a way to set the length of the widget? Or any clue on why is the widget behaving like this? Any tips on how to handle the widget?

I am stuck at this point for a while now. Any pointers will be highly appreciated…

Thanks,  
Sneha

 ![image](https://discourse.vtk.org/uploads/default/original/2X/0/0a5e7e394bc81f82e979bd2c3857aaaeee2bbdab.png)
