How to release mouse capture

Hi there,

I’m now using a slider class. When I try to drag the slider to certain area, I’d like to release the mouse capture by itself and stop dragging.

Does anyone know how to release the mouse capture by itself? Is it possible? If there is a useful method like releaseMouseCapture (not JUCE API), I’ll call it.

Releasing mouse-capture’s not something that I’d mess about with, as it’s really not a platform-independent thing to do. Might be possible on windows, but it’s better to implement the behaviour you need using normal coding methods.

But surely if you drag a slider and it suddenly releases the mouse, that’d be incredibly annoying?

Thanks for the advise! I’m reviewing my code to implement an other good way. Specifically, I wanted to implement the same behavior as the time progress bar which iTunes has. The bar behaves as follows:

[Mac]
When I attempt to drag the bar to the right side, the next song will be played automatically. Next, when I attempt to drag the bar to the left side, the bar doesn’t move. I thought that the mouse capture was released, but I may have another guess coming. Actually, I don’t understand the detail.

[Win]
When I do the same thing, the mouse drag is not released, because when I drag it to the left side, the progress bar moves.

About this operation, iTunes has the different specifications on each platform.

Anyway, I realized that the releasing mouse capture was not good way on this situation, so I’m implementing an other normal way. Thanks!