# How To Make Click&Drag Number Box Slider (Without the Slider)?

**URL:** <https://forum.juce.com/t/how-to-make-click-drag-number-box-slider-without-the-slider/24071>\
**Category:** General JUCE discussion\
**Created:** [September 6, 2017, 11:33am UTC](https://forum.juce.com/t/how-to-make-click-drag-number-box-slider-without-the-slider/24071 "2017-09-06T11:33:35Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![jamiebullock](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jamiebullock/32/459_2.png) [@jamiebullock](https://forum.juce.com/u/jamiebullock)\
**Post date:** [December 19, 2018, 1:48pm UTC](https://forum.juce.com/t/how-to-make-click-drag-number-box-slider-without-the-slider/24071/14 "2018-12-19T13:48:05Z")

</div>

In case anyone arrives here from Google like I did, there’s an easy way to make a draggable number box without overriding LookAndFeelMethods or writing any custom classes, simply:

```
slider.setSliderStyle(Slider::SliderStyle::LinearBarVertical);
slider.setSliderSnapsToMousePosition(false);
slider.setColour(Slider::trackColourId, Colours::transparentBlack);
slider.setSize(60, 20);
```

---

_[View the full topic](https://forum.juce.com/t/how-to-make-click-drag-number-box-slider-without-the-slider/24071)._
