Skip to main content

Newline/Carriage return in TextArea

1 reply [Last post]
Anonymous

Hi,

Is it possible to implement the newline/carriage returns in the TextArea
component? I saw an earlier thread that did not have an answer; hence
this question.

Following is the code snippet that I tried -

TextArea ta1 = new TextArea("",8,15,8);
TextArea ta2 = new TextArea("",1,15);

ta2.setText("First Line");
ta1.setText( ta1.getText() + "\r\n" + "Second Line");

The output I got was: "First LineSecond Line".

Any help is greatly appreciated.

regards,
Rajendra

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Matteo Mazzotti

Hi Rajendra,
Chen actually replied to my question:

>Hi Matteo,
>Seems like we have a bug here, I will investigate and probably will fix for
the next drop.

>Thanks,
>Chen

I guess we'll have to wait until their next code drop ;)
Matteo

> -----Messaggio originale-----
> Da: Raj Patwari [mailto:rpatwarireg@gmail.com]
> Inviato: martedì 17 giugno 2008 7.47
> A: users@lwuit.dev.java.net
> Oggetto: Newline/Carriage return in TextArea
>
> Hi,
>
> Is it possible to implement the newline/carriage returns in
> the TextArea component? I saw an earlier thread that did not
> have an answer; hence this question.
>
> Following is the code snippet that I tried -
>
> TextArea ta1 = new TextArea("",8,15,8);
> TextArea ta2 = new TextArea("",1,15);
>
> ta2.setText("First Line");
> ta1.setText( ta1.getText() + "\r\n" + "Second Line");
>
> The output I got was: "First LineSecond Line".
>
> Any help is greatly appreciated.
>
> regards,
> Rajendra
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
> For additional commands, e-mail: users-help@lwuit.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net
For additional commands, e-mail: users-help@lwuit.dev.java.net