gpt4 book ai didi

java - 如何更改 JavaFX 中的突出显示颜色?

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:02:38 30 4
gpt4 key购买 nike

如何更改 JavaFX 中的突出显示颜色?通常它是带有渐变的蓝色,但我想要绿色突出显示。我尝试了以下方法:

.root{
-fx-shadow-highlight-color: #CCFF99;
}

感谢您的帮助!

最佳答案

查看 caspian.css (JavaFX 2) 或 modena.css (JavaFX 8)

.root {
/* A bright blue for highlighting/accenting objects. For example: selected
* text; selected items in menus, lists, trees, and tables; progress bars;
* default buttons.
*/
-fx-accent: #0093ff;

/* A bright blue for the focus indicator of objects. Typically used as the
* first color in -fx-background-color for the "focused" pseudo-class. Also
* typically used with insets of -1.4 to provide a glowing effect.
*
* TODO: should this be derived from -fx-accent?
*/
-fx-focus-color: #0093ff;
}

根据用途更改这些颜色。

关于java - 如何更改 JavaFX 中的突出显示颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14126468/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com