Skip to content

makeTextBox

Steve Paget edited this page Jan 11, 2017 · 4 revisions

Creates a TextBox for user input


Syntax:

yourTextBoxName = makeTextBox(xpos, ypos, width, case*, startingText*, maxLength*, fontSize*)

parameters marked * are optional

Where:

xpos is an integer representing position of the TextBox from the left edge of the window.
ypos is an integer representing position of the TextBox from the top edge of the window.
width is an integer representing width of the textbox.
case is an integer representing case rule of the textbox:

  • 0 means that letters can be capitalised using Shift as normal. This is the default.
  • 1 means that all letters will be forced to be lowercase.
  • 2 means that all letters will be forced to be uppercase.
startingtext is a string representing the hint text that appears in the box. The default is "Please type here". maxLength is the maximum number of characters. Zero (the default) means "no limit" fontSize is the font size of the text. The box will scale vertically to accommodate the text.
Note: This function is used to make a TextBox object. It does not get the input. For that you need textBoxInput. You should only make a particular TextBox once, rather than each time you want to take an input.
Clone this wiki locally