Change the color of the sliders

I'm trying to change the tick color for the slider in JavaFX 2.2, but it came up a bit - I cannot find CSS properties on the slider that claim to do this, and I cannot find methods on the slider that seem to do this too (there seems to be , is a property of formatting label labels, but not label labels themselves.)

Is there a way, or am I stuck with it myself?

+3
source share
1 answer

Use this style description for ticks and blue:

.slider .axis .axis-tick-mark, .slider .axis .axis-minor-tick-mark {
    -fx-fill: null;
    -fx-stroke: blue;
}

The first is for the primary, the second is for the secondary.

slidertickcolors

+5
source

Source: https://habr.com/ru/post/1694419/


All Articles