TextBox: Difference between revisions
Jump to navigation
Jump to search
Line 20: | Line 20: | ||
| autocorrect || Spellcheck as entering? May not be available on other platforms. | | autocorrect || Spellcheck as entering? May not be available on other platforms. | ||
|- | |- | ||
| inputType || Specifies what kind of data will be input. Choices are color, date, datetime, email, hidden, month, number, password, range, search, tel, text, time and url. Default is text. | | inputType || Specifies what kind of data will be input. Choices are color, date, datetime, email, file, hidden, month, number, password, range, search, tel, text, time and url. Default is text. | ||
|- | |- | ||
| password || Text to be displayed in the field just as a comment – does not change the value. | | password || Text to be displayed in the field just as a comment – does not change the value. |
Revision as of 15:36, 27 February 2013
Description
The TextBox control is used to display a single line input area.
While a variety of different events are available, the usual response to editing a TextBox is to call the function <buttonID>_onblur().
To add a TextBox to your app, choose the TextBox icon in the Toolbar, then position it on the Design Screen. Use the Property Editor to set the properties you need. If necessary, add functions to your code to respond to the events that come from the TextBox: usually, just onblur.
Properties
Standard properties are supported, plus:
autocapitalize | Automatically capitalize first letter? May not be available on other platforms. |
autocomplete | Automatically complete words? May not be available on other platforms. |
autocorrect | Spellcheck as entering? May not be available on other platforms. |
inputType | Specifies what kind of data will be input. Choices are color, date, datetime, email, file, hidden, month, number, password, range, search, tel, text, time and url. Default is text. |
password | Text to be displayed in the field just as a comment – does not change the value. |
placeholder | Text to be displayed in the field just as a comment – does not change the value. |
readonly | If set to “True”, the control cannot be edited. |
size | Maximum characters allowed. |
text | The contents of the TextBox. Same as value. |
value | The contents of the TextBox. This is always returned as a string. Convert it to a number before doing arithmetic on it – see “Conversions”. |
Events
Standard events are supported, plus:
onblur | Called when exiting the field. |
onkeypress | Called when a key is pressed. |
Example
Rem TextBox Example Function Text1_onblur() Msgbox Text1.value End Function