[9:7] extends: Node, Control, Region
Represents a JavaFX Slider, a control for selecting a numeric value within a range by sliding a knob. The Slider class supports optional tick marks, tick labels, and change event handling.
Slider (double Min, double Max, double Val
)
Initializes a new Slider instance with specified minimum, maximum, and initial values.
Min
is a double value that sets the minimum value of the slider.Max
is a double value that sets the maximum value of the slider.Val
is a double value to set for the initial position of the slider.this
objectsetShowTicks (bool ShowTicks
)
Sets whether tick marks should be displayed on the slider.
ShowTicks
A boolean specifying whether to show tick marks.this
object for chainingsetShowLabels (bool ShowTicks
)
Sets whether tick labels should be displayed on the slider.
ShowTicks
A boolean specifying whether to show tick labels.this
object for chainingsetValue (double Val
)
Sets the current value of the slider.
Val
is a double value to set for the slider.this
object for chainingonChange (callback OnChange
)
Sets a callback function to execute when the slider's value changes.
OnChange
The callback function for the value change event.void