InputField
Kind of class: | public class |
---|---|
Package: | |
Inherits from: |
|
Implements: | |
Classpath: | org.asaplibrary.ui.form.components.InputField |
File last modified: | Friday, 13 May 2011, 22:20:35 |
UI Component class for text input.
This class provides text input with validation through Validator, focus through FocusManager, and has an error state.
The following requirements must be met to use this class:
- This class must be linked to a library item of type MovieClip
- The library item has a TextField child set to input, with the instance name "tInput"
- Optionally, the library item has a MovieClip child with instance name "tError", to be used for displaying an error state
Summary
Constructor
-
InputField
()
- Constructor
Instance properties
- tInput : TextField
- tError : Sprite
-
text
: String
- The text in the contained input field The text in the contained input field
-
hintText
: String
- Set the hint text to be displayed when nothing has been input in the field yet
-
hintTextColor
: uint
- Set the colour of the hint text
Instance methods
-
setEnabled
(inEnable:Boolean) : void
- Enable or disable input
-
setFocus
() : void
- Give focus to this component
-
clearFocus
() : void
- Clear focus flag
-
hasFocus
() : Boolean
- Return true if this element has focus
-
getValue
() : *
- Return the value to be validated
-
showError
() : void
Constructor
InputField
function InputField()
Constructor
Instance properties
hintText
hintText:String(write)
Set the hint text to be displayed when nothing has been input in the field yet
hintTextColor
hintTextColor:uint(write)
Set the colour of the hint text
tError
tError:Sprite(read,write)
tInput
tInput:TextField(read,write)
text
text:String(read,write)
The text in the contained input field The text in the contained input field
Instance methods
clearFocus
function clearFocus() : void
Clear focus flag
getValue
function getValue() : *
Return the value to be validated
hasFocus
function hasFocus() : Boolean
Return true if this element has focus
reset
function reset() : void
Reset the input field
setEnabled
function setEnabled(inEnable:Boolean) : void
Enable or disable input
setFocus
function setFocus() : void
Give focus to this component
toString
override function toString() : String
Overrides
- MovieClip.toString