TextInput
A widget that allows to enter text. Includes Widget API
Properties
alignment
Type: string, supported values: left
, right
, center
, default: left
The horizontal alignment of the text.
autoCapitalize
Type: boolean, default: false
Automatically switch to capital letters after every key pressed.
autoCorrect
Type: boolean, default: false
Enables the spell checker and auto-correction feature.
editable
Type: boolean
keyboard
Type: string, supported values: ascii
, decimal
, email
, number
, numbersAndPunctuation
, phone
, url
, default
, default: default
Selects the keyboard type to use for editing this widget.
message
Type: string
A hint text that is displayed when the input field is empty.
text
Type: string
The text in the input field.
type
Type: string, supported values: default
, password
, search
, multiline
, default: default
The type of the text widget.
This property can only be set in the tabris.create
method. It cannot be changed after widget creation.
Events
“accept” (widget, text, options)
Parameters:
Fired when a text input has been finished by pressing the keyboard’s Enter key. The label of this key may vary depending on the platform and locale.
“blur” (widget)
Parameters:
- widget: TextInput
Fired when the widget lost focus.
“change:text” (widget, text, options)
Parameters:
Fired when the text property changes.
“focus” (widget)
Parameters:
- widget: TextInput
Fired when the widget gains focus.
“input” (widget, text, options)
Parameters:
Fired when the text was changed by the user.