I have some text that is passed dynamically, but the design of the text requires that the top line is tabbed in, so it looks like this:
Stackover flow rules, Stackover flow rules,
开发者_如何学Python
Stackover flow rules, Stackover flow rules, Stackover flow rules,
Could I use HTML special characters to do this?
Stephen
You could enter text that has a "\t" (TAB) character as the first character of the first line. And make sure your textfield has a textformat with tab stops in it.
I did it recently like this:
var tf:TextFormat = _textField.defaultTextFormat;
tf.tabStops = [20]; // make the indentation 20 px
_textField.defaultTextFormat = tf;
_textField.text = "\t"+text;
First, you should specify what text container you use. For p
html tag, there is text-indent property to indent first line. Alternatively, you can use
characters.
精彩评论