开发者

Flex textflow Paragraphe

I have a problem with RichText element and (auto)-indents in paragraphs. (see image)

开发者_Go百科

Flex textflow Paragraphe

My code:

<s:RichText id="richTxt" paddingLeft="60" paddingTop="10"
    width="300">
    <s:content >
    <s:p  >
                Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam eu nulla. nc dapibus, nisi et iaculis feugiat, leo ipsum venenatis enim, a nonummy magna ante vitae diam. <s:br />
                Morbi volutpat leo in ligula. Integer vel magna. Quisque ut magna   nc dapibus, nisi et iaculis feugiat, leo ipsum venenatis enim, a nonummy magna ante vitae diam. <s:br />
                Morbi volutpat leo in ligula. Integer vel magna. Quisque ut magna   nc dapibus, nisi et iaculis feugiat, leo ipsum venenatis enim, a nonummy magna ante vitae d
            </s:p>  
    </s:content>                
</s:RichText>

I have tried:

  • textAlign
  • paragraphStartIndent
  • paragraphEndIndent

But either it influence only the first line of the paragraph or nothing happends

Edit

The question is: Is it possible to align the text in the paragraph without the indent of the first line?

Thanks for your help


The whitespace you see rendered is not an indentation of any kind. It is simply, well, whitespace.

If you would display hidden characters in your code you'd see <s:p>[return][tab][tab][tab]Lorem ipsum.... All of these whitespace characters are collapsed into a single space (much like HTML does).

So the solution is pretty simple: put it all on one line.

<s:RichText id="richTxt" width="300">
    <s:textFlow>
        <s:TextFlow>
            <s:p><s:span>Lorem ... diam.<s:br />Morbi ... diam.<s:br />Morbi ... vitae d</s:span></s:p>
        </s:TextFlow>
    </s:textFlow>               
</s:RichText>


Try to remove any extra tab or space in your raw text. I'd also try to use a fixed-width font.

EDIT : damn, not fast enough ! ^^

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜