Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Adding text to a Multiline textarea

Posted on 2003-03-20
5
Medium Priority
?
220 Views
Last Modified: 2010-04-17
What is the best and easiest way to insert new lines of text into a multilined textbox.  I just need to append text everytime a button is clicked.

Thanks
GReg
0
Comment
Question by:prymak
  • 3
  • 2
5 Comments
 
LVL 30

Expert Comment

by:Mayank S
ID: 8172422
>> multilined textbox

You mean, a TextArea right?

Just use the append () method defined by TextArea. It takes the string to be appended as an argument.

Mayank.

0
 
LVL 30

Expert Comment

by:Mayank S
ID: 8172433
Let mytextarea be the TextArea object.

public void actionPerformed ( ActionEvent ae )
{
  if ( ae.getSource () == somebutton ) // which-ever you click upon & then the text is to be added
    mytextarea.append ( "This is the text to be appended. " ) ; // end if

} // end of actionPerformed ()


Mayank.
0
 

Author Comment

by:prymak
ID: 8174951
I did mean textbox.  I created a textbox named faqsheet.
then made it multilined,

faqsheet.multiline

I need to add text to this textbox without destroying whats there.  There is no append method.
0
 

Author Comment

by:prymak
ID: 8175003
I thought I had posted this question in the right place, I just realized this isnt the Visual Basic forum.  The language I am workin in is VB
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 220 total points
ID: 8178875
You can try:

faqsheet.Text = faqsheet.Text & "This is the text which will be appended. "

I guess that should help you!

Mayank.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Six Sigma Control Plans

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question