How to force a line break in dynamic input field?

Hello,

I’ve created dynalically a multiline input field for a backend app, the prob I’m facing is that even if I have used a “width” parameters, the user can type a text as long as he want on the first line of the field, it never line break to the next one.

Here is my code


        msgBox.type = TextFieldType.INPUT ;    
        msgBox.embedFonts = true;
        msgBox.defaultTextFormat = textFmt;
        msgBox.multiline = true ;
        msgBox.width = 225;
        msgBox.height = 300 ;
        msgBox.border = false ;
        msgBox.x = 21 ;
        msgBox.y = 203 ;
        msgBox.text = "" ;
        msgBox.restrict = "A-Z a-z 0-9 !.,?";
        msgBox.tabIndex = 4;
         form.addChild(msgBox);    

The prob is that i need to display these information on another multiline textfield after that,

Thank you thank you !!