Event when updating a JavaFX Slider

1

I want to execute a code every time a Slider JavaFX is updated but only when you stop moving your slider ( thumb ) with the mouse. I have tried with the events OnMouseExited and OnMouseDragReleased but none works.

What event do I need to use?

    
asked by Oundroni 01.07.2016 в 09:37
source

1 answer

1

When we click with the mouse on the thumb of a control Slider in order to modify its value, the events that are generated are the following:

  • OnMousePressed when we click the mouse
  • OnMouseDragged in case we slide your thumb
  • OnMouseReleased when we stop pressing the mouse
  • OnMouseClicked just after the previous event
  • If you want to execute a code just at the moment of releasing the mouse you need to capture the OnMouseReleased event. This is where you have to place any code that updates or modifies other Slider to avoid a continuous readjustment of these (and possibly an annoying blink) before reaching the desired value.

        
    answered by 01.07.2016 / 15:43
    source