A text input element is used to enter a single line of text. It has a label that displays a prompt text when there is no text written to the text input.
See also:
Constructor
Variables
maxLength:Int = Config.textInputMaxLength
valid:Bool = true
true
if the text value of this TextInput
is valid based on the
regular expression set in validationReg
. If this value is false
, the
text field is highlighted in a different color (theme property
"color_invalid"
).
See also:
validationReg:EReg = null
A regular expression that checks whether the input text is a valid value
for this text input. If null
, no validation check is performed.
See also:
Methods
insertText(newText:String, position:Int):Void
Insert the given text at the given position. If the position is greater
or equal than the length of the text, newText
is inserted at the
end of the element's current text. If the new text of this element is
greater than maxLength
, the text is truncated.
isTextValid():Bool
Return whether the text value of this element is valid according to the
regular expression stored in TextInput.validationReg
.