getTextInput(id).settings.length( number )
(since beta 0.3)
Limits the maximum number of characters that can be entered in the input box. 0
or lower means no limit (default setting). Note that linebreaks count as characters in the limit (\n
and \r
).
Example:
[js highlight=”2″ try=”true”]newTextInput(“haiku”, “hatsu shigure\nsaru mo komino o\nhoshige nari”)
.settings.length(45)
.settings.lines(3)
.print()[/js]
Adds a 3-line input box limited to 45 characters to the screen, containing a haiku (note the \n
to insert linebreaks in the text).