Reputation: 581
I have node "Text" and i need change color from CSS. I am trying
-fx-text-fill: black;
but it doesn`t work. Can anyone help? I think, that there is another property for "Text" node, but i cant find it.
Upvotes: 0
Views: 105
Reputation: 3126
-fx-fill use linear-gradient
try this...
txt.setStyle(" -fx-font: 100px Tahoma;
-fx-fill: linear-gradient(from 0% 0% to 100% 200%, repeat, red 0%, red 50%)");
Upvotes: 1