We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Textarea - automatic word-wrap
Page Index Toggle Pages: 1
Textarea - automatic word-wrap (Read 329 times)
Textarea - automatic word-wrap
Jul 29th, 2008, 4:26pm
 
Hello all,

I try to create a multiline textarea, where users have the possibility typing by the keyboard.

How can I create an automatic word-wrap?

Users can press ENTER, this is not the problem, but if the textarea is bounded, the program should break automatically.

Is there a possibilty?

Thanks for answers!
Re: Textarea - automatic word-wrap
Reply #1 - Jul 29th, 2008, 6:49pm
 
One of the extra modes of text() will automatically wrap text at a certain point. however it's not clever enough to work out the boundaries of words and wrap on them, you'd have to work it out yourself with textWidth() etc.
Page Index Toggle Pages: 1