简体   繁体   中英

How to change the menu color in javafx when it is focused

在此处输入图片说明

This is a menu and when I focus it, it is blue. How to change the color using CSS?

I tried this:

ainmenubar.setStyle("-fx-focus-color: #555555;");

But it does not work.

用于查找的颜色是-fx-selection-bar :试试

ainmenubar.setStyle("-fx-selection-bar: #555555;");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM