左对齐textlayoutformat的最后一行 [英] Left alignment for last line of textlayoutformat

查看:181
本文介绍了左对齐textlayoutformat的最后一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为以下tlf设置 textLayoutFormat.textAlign = TextAlign.JUSTIFY;

 示例文本示例文本示例文本
示例文本示例文本示例文本
示例文本

但看起来像这样

 示例文本示例文本示例文本
示例文本示例文本示例文本
示例文本

我想为最后一行设置左对齐。 $ b

解决方案使用 textAlignLast 属性



例子:
$ b

< s:TextArea
textAlign =justify
textAlignLast =right
text =示例文本示例文本示例文本
示例文本示例文本示例文本
示例文本
/>

输出:

 示例文本示例文本示例文本
示例文本示例文本示例文本
示例文本

请注意, textAlignLast 只能用于对齐的文本。


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.

解决方案

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.

这篇关于左对齐textlayoutformat的最后一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆