0

Please advise me, how to set the text color in a StyleableTextField.

The following doesn't work for me (the color stays black):

  tf.setStyle('color', 0xFF0000);

And this too:

  tf.setStyle('color', 'red');
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416

1 Answers1

1

StyleableTextField has a textColor property. Try using that. (tf.textColor = 0xFF0000;).

However, I found that in my ItemRenderers I sometimes need to use both the textColor property and the setStyle to properly change colors of StylableTextFields. Don't really know why, yet.

AlBirdie
  • 2,071
  • 1
  • 25
  • 45