TextBox TB = New TextBox ("Title", "Initial Text", 10, TextField.Any); Parameter Description: The first is the title, the second is the initial content, the third is to allow the maximum length of the input character (Unicode code Chinese is also calculated), the fourth is the limit type. Tb.setString () Settings content, tb.getstring () Removes content. TB.SetMaxSize () Setting length, tb.getmaxsize () takes out the length. Tb.size () Returns the length of the current content.
The last parameter is the limit type, as follows: limitations in the storage content: TextField.ANYTextField.EMAILADDRTextField.NUMERICTextField.PHONENUMBERTextField.URLTextField.DECIMAL restriction system: TextField.PASSWORDTextField.UNEDITABLETextField.SENSITIVETextField.NON_PREDICTIVETextField.INITIAL_CAPS_WORDTextField.INITIAL_CASP_SENTENCE
GetConstraints () / setConstRAINTS () Sets and removes the limit type.