TextInput
Constructors
Description
Creates a new TextInput control.
Members
Description
Gets or sets the alignment of the label or text input. The values that are allowed are left, right or center.
Description
Gets or sets whether the control is editable. This causes the control to gray out and visual indicate its unable to take input or is disabled.
Description
Gets or sets the font (family, size, weight, etc) of the text on the input or label.
Description
Gets or sets whether the ENTER key creates a new line or when text reaches the end of the control it wraps to a new line. The default is false.
Description
Gets or sets the text that is displayed in the text input or label prior to being modified by the user or programmatically. This is useful if you're collecting a field and want to use the area in the text input as an indicator of what value should be provided rather than create a seperate label. The default is an empty string.
Description
Gets or sets whether the control is read only or not. If true, the control is disabled as a label. If false, its disabled as a text input. The default is false.
Description
Gets or sets whether the text input has a visible scroll bar. If linewrap is set to false, the control does not display a scrollbar by default. The default is false.
Description
Gets or sets the color of the text on the input or label.
Description
Gets or sets the text as the value of the input or label.
Description
Gets or sets whether the control is visible on screen. The default is true.
Events
Description
Fires when the text has changed and new text is available. This is after the keydown event. This is useful if you'd not like to listen to keyup or keydown as those events may fire even if the value did not change (e.g., if the user changes the cursor selection with the arrow keys.)
Description
Fires when the user has finished inputting text. This is determined by when the user presses return when linewrap = false (e.g., the text input only takes a single line of text), or when the control looses focus or another event prevents input. This event is useful to listen to if you need to take an action AFTER a user has fully inputted all the text, for example the URL input field on a browser, only until the user is fully done typing should we try and load the URL.
Description
Fires when the user begins inputting text prior to keyup, keydown or input. This event is useful if an animation or other event should fire when the user first types, but not on every key afterwards. For example, you might listen to this event to show some sort of in-context dialog or menu while the user is typing (like an auto-fill menu).