How to set slider drag mode

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.

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.

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

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