Move mouse cursor

How can I move the mouse cursor to the middle position of the LinearVertical Slider component (black line of the image) when I operate the LinearVertical Slider?

When using the image, the mouse cursor will be slightly off the center.


Below <ImageKnob *> returns to its original position with LastMouseDownPosition when mouse up with Lotary knob.

This is perfect for me.

<ImageSlider *> is also trying to move the mouse car saw in the middle of the component with the mouse package, but it was impossible.

It seems possible to solve the component of the LinearVertical Slider if it can acquire the position.!

void MainEditor::mouseUp (const MouseEvent& e)
if (dynamic_cast<ImageKnob*>(e.eventComponent))
else if (dynamic_cast<ImageSlider*>(e.eventComponent))

Thank you

I’m not quite sure what you mean. Did you mean to upload an image in this post? You can do that by either dragging the image into the text box or clicking the ‘upload’ button:

Also if you indent your code by 4 spaces or surround it with ``` it is much easier to read.