How to stop moving mouse cursor when slider dragging?

is there any option in Slider to keep mouse position constant when dragging slider?
I tried to use things like setMouseCursor() and getMouseCursor() but with no success.

In some plugins ( for example Logic Pro EQ ) I’ve seen that feature and it is very handy, especially when you keep your plugin open for example on the bottom of your screen and you want to decrease slider value by drag it down, but you are blocked by the bottom edge of your screen. So first you need to move your plugin window little bit upper.

Perhaps looking at the Slider class pimpl code for the velocity handling will help you out… it hides the mouse cursor when in velocity mode.


Hmm… I will check it. Thanks.

Just add this line:

slider.setVelocityBasedMode (true);

Hello, I found the solution to use that without velocity mode. I use:
MouseEvent::source.enableUnboundedMouseMovement(true, false);
inside of MySlider::mouseDrag()

I hope it is appropriate solution. At least works for me.

Here is link to explanation: