Left alignment for last line of textlayoutformat

。_饼干妹妹 提交于 2019-12-11 05:07:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!