I want to modify the css style of my combobox to reduce the text-size of its promptText.
How can this be done?
If you only want to change size of the prompt text, and not the other text, I don't think there is any way: there's simply no hook into the text node for the prompt text that distinguishes it from the displayed text.
You can change the color via a special css property:
.combo-box .text-field {
-fx-prompt-text-fill: rgba(255, 0, 0, 0.5) ;
}
.combo-box .text-field:focused {
-fx-prompt-text-fill: transparent ;
}
but I don't see any way to change any other style properties.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With