0

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.

1
  • Can you show a little bit more code? Like, if are you adding this directly to your node in Java, using setStyle(...) show the code, or if are you skinning it using a custom CSS file, show the code and the complete CSS fragment in use. Commented Jan 22, 2014 at 9:14

1 Answer 1

1

-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%)");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.