How to change the highlighting color in JavaFX?

后端 未结 3 1167
春和景丽
春和景丽 2021-02-14 23:09

How to change the highlighting color in JavaFX? Usually it is blue with gradients, but I would like to have a green highlighting. I have tried the following:

.ro         


        
3条回答
  •  面向向阳花
    2021-02-14 23:37

    I think Uluk Biy has answered it great way.

    But the reality is styling using CSS does not override the -fx-focus-color: #0093ff, rather it will overlap. If you use -fx-focus-color: red , it will get mixed with default blue color and show a shade of grey like color. The css attribute -fx-accent has no issues.

提交回复
热议问题