how to make text line break in flex textarea

Cameron A. Ellis picture Cameron A. Ellis · Nov 24, 2008 · Viewed 60.7k times · Source

I have a string

var s:String = "This is a line \n This is another line.";
this.txtHolder.text = s; //.text has \n, not a new line

and i want to put it into a text area, but the new line character is ignored. How can i ensure that the text breaks where i want it to when its assigned?

Answer

Tolgahan ALBAYRAK picture Tolgahan ALBAYRAK · May 4, 2009

On flex, while coding \n is working well on mxml or any xml to define a line just use 
 line entity.

I mean:

lazy
fox

gives us

lazy<br />
fox