This works for me:

                                tf = new TextField();
                                tf.styleSheet = cssSheet;
                                tf.autoSize = TextFieldAutoSize.LEFT;
                                tf.multiline = true;
                                tf.wordWrap = true;
                                tf.htmlText = "<SPAN
CLASS='Tekst'>"+myXML.tekst+"</SPAN>";
                                tf.width = myXML.myWidth;
                                tf.x = myXML.positieX;
                                tf.y = myXML.positieY;

I read in the variables from an xml, but that’s up to you.

Regards
Cor


-----Original Message-----
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of natalia
Vikhtinskaya
Sent: maandag 21 februari 2011 15:45
To: Flash Coders List
Subject: Re: [Flashcoders] Multiline text width

Text box has setting "single line"
I make it multiline
desc.txt.autoSize = "left";
desc.txt.multiline = true;
That gives me correct width but long text is now in in one big line.
If i add
desc.txt.wordWrap = true;
It gives correct nultiline text but width is now not correct for short text.

2011/2/21 Cor <c...@chello.nl>:
> Give your text box a width
> Set :
> wordWrap = true;
> mulitLine = true;
>
> HTH
> Cor
>
> -----Original Message-----
> From: flashcoders-boun...@chattyfig.figleaf.com
> [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of 
> natalia Vikhtinskaya
> Sent: maandag 21 februari 2011 15:16
> To: Flash Coders List
> Subject: [Flashcoders] Multiline text width
>
> Hi
> I have multiline dynamic text box. Text can have different width 
> because it is html text and has <br>. I need to know text width.
>
> If  I use txt. autoSize = "left" that does not have effect for 
> multiline text box.
> What possible solution?
>
> Thanks in advance.
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to