How to set slider drag mode


#1

Hey guys,

very much new to JUCE and c++ in general. I was looking around the docs and messing around a bit and figured out how to set create a slider, but I’m stuck on editing the drag mode.
I figured it would just be a dot method like slider.setDragMode, but that doesn’t seem to work.


#2

As far as I know, there’s no way to programmatically set the drag mode. The slider will have the “velocity” mode when Control+dragging the slider.


#3

Okay! Just saw that it’s actually a parameter for the snapValue func


#4

actually you’re looking for Slider::setVelocityBasedMode()