Multiple lines in a TEXT AREA BOX


#1

I have a few students who wish to use a loop to print multiple lines of text in a TEXT AREA BOX using “setText” but setText keeps writing over itself and erasing the previous text each time through the loop.

The command “write” does the trick but we have no control over where is is printed. WRITE doesn’t use a text area box.

How can we continue to ADD lines of text in a text area box?

Thanks for any help


#2

The easiest way would be to keep concatenating to the old text in the text box. Something like

var str = getText(txtBox) + " add this";
setText(txtbox, str);


#3

Great idea.

Thanks

I’ll try it later