Multiple lines in a TEXT AREA BOX

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

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);

1 Like

Great idea.


I’ll try it later