Issue
I'm using ScalaFX, which is currently proving itself to be thoroughly useless and bugging out anytime I try to use css. Is there any way to change the fill color of a Slider
without using css, or at least without separate css files?
I've managed to change the track color with slider.setStyle("-fx-control-inner-background: #f08080;")
, but can't get the thumb working.
Solution
You could use the -fx-base
property:
Example:
slider.setStyle("-fx-base: #f08080;");
However why don't you consider using a CSS file? It simplifies everything and allows you to make a lot more customizations. Take a look at the Slider JavaFX CSS reference, I think you will find what you're looking for.
Answered By - mikyll98
Answer Checked By - Robin (JavaFixing Admin)