Reputation: 23038
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');
Upvotes: 0
Views: 463
Reputation: 2071
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.
Upvotes: 1