TEXAREA wordwrap
Jan 5, 2019 17:07:46 GMT -5
Post by donnybowers on Jan 5, 2019 17:07:46 GMT -5
How do you get a textarea to wordwrap. They're not very useful if there's no wordwrap.
[start]
cls
textarea #ta, ""
'two print statements but both print to same line
#ta print("Run";chr$(32))
#ta print("BASIC (two words on same line)")
'force a new line on browser page for the link
print ""
link #cnt,"Continue",[cont]
wait
[cont]
gosub [refresh]
'println() method appends a CR/LF
#ta println("")
#ta println("CR/LF appended to this one")
'print blank line CR/LF only
#ta println("")
#ta println("New line")
'print() method has no CR/LF
#ta print("Another new line")
'force a new line on browser page for the link
print " "
link #nxt, "Next", [next]
print " "
wait
[next]
gosub [refresh]
print " "
print "Contents of Textarea is: "
print text$
print " "
link #clr, "Clear textarea", [clearTa]
wait
[clearTa]
'text() method replaces all text with quoted string, in this case an empty string
#ta text("")
print " "
link #res, "Restart", [start]
wait
[refresh]
'get the contents of textarea into a string
text$ = #ta contents$()
'clear the page
cls
'create the textarea and fill with text$
textarea #ta, text$
return