问题
I set textLayoutFormat.textAlign = TextAlign.JUSTIFY;
for following tlf
sample text sample text sample text
sample text sample text sample text
sample text
but it look like this
sample text sample text sample text
sample text sample text sample text
sample text
I want to set left align for last line.
回答1:
use textAlignLast
property.
Example:
<s:TextArea
textAlign="justify"
textAlignLast="right"
text="sample text sample text sample text
sample text sample text sample text
sample text
"/>
outputs:
sample text sample text sample text
sample text sample text sample text
sample text
Notice that textAlignLast
works only for justified text.
来源:https://stackoverflow.com/questions/8713578/left-alignment-for-last-line-of-textlayoutformat