When a mnemonic character "_"
is added to the menu text, we have to press the Alt key to make the mnemonic underline appear. How to let the menu mnemonic underline appear always before we press Alt?
Asked
Active
Viewed 1,411 times
9

Jens Piegsa
- 7,399
- 5
- 58
- 106

user2671610
- 153
- 4
1 Answers
12
To make the mnemonic underlines visible all the time, just add the following to your css file:
.mnemonic-underline {
-fx-stroke: -fx-text-base-color;
}

Jens Piegsa
- 7,399
- 5
- 58
- 106
-
3You actually want `-fx-stroke: -fx-text-fill`, so it can change color when the menu item is selected – Michael Mrozek Mar 24 '16 at 02:31