Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying text in a "text area"

Status
Not open for further replies.

dexter195

Programmer
Jun 18, 2003
220
EU
i want to put text into a 'text area' when i press a button. i can do this but when i press the button again it replaces the text.
this is how i want to display the text.

First Line
Second Line
Third etc

ive used the 'insert(string, int)' class
text1.insert("First Line", 2);
but this is what i get

FiSecond Line

ive tried using just
text1.insert("First Line");
but this just deletes what was already there.

thanks for the help

dex
 
Hi,

Why dont you show the StringBuffer in the textarea. And append the String to StringBuffer, and at the every end of the line add '\n'. So that it will show the strings in the subsequent lines.

Cheers,
-Venu
 
cheers venur. i was trying /n not \n. youve saved me a headache.
thanks
dex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top