JavaFX Slider: Track length? Tick Label Color?(JavaFX 滑块:轨道长度?勾选标签颜色?)
问题描述
<小时>
注意:对于垂直的Slider
,要影响轨道的长度,必须使用-fx-pref-height
属性:
My feeble attempts of writing CSS styles for the slider both don't work. I'm 100% sure my syntax is off. Any help?
You can do it by setting the -fx-pref-width
attribute of slider
and setting the -fx-tick-label-fill
attribute of .slider .axis
:
Note: For vertical Slider
, to affect the length of the track, you have to use the -fx-pref-height
attribute:
这篇关于JavaFX 滑块:轨道长度?勾选标签颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!