"Java MobilePDA Program Design" Reading Note 4 - LCDAUI Advanced API TextBox

xiaoxiao2021-03-06  14

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.

转载请注明原文地址:https://www.9cbs.com/read-47231.html

New Post(0)