HintedInputField
| Kind of class: | class |
|---|---|
| Inherits from: | InputField < EventMovieClip < MovieClip |
| Implements: | |
| Known subclasses: | |
| Author: | Martijn de Visser |
| Classpath: | org.asapframework.ui.input.HintedInputField |
| File last modified: | Saturday, 07 October 2006, 00:27:45 |
Class to create a hinted input field with. The hint is shown in the field. As soon as the field gets focus, the hint is removed. If no text is entered or the same text as the hint text is entered, the hint will re-appear as soon as the textfield looses focus.
Usage:
-
var mHintFormat:TextFormat = new TextFormat(); mHintFormat.color = 0x067ADD; var mTextFormat:TextFormat = new TextFormat(); mTextFormat.color = 0x001E69; msg_txt.textFormat = mTextFormat; msg_txt.hintFormat = mHintFormat; msg_txt.hint = "(your message)";
Summary
Constructor
Instance properties
- mHint : String
- mTrimmedHint : String
- mHintFormat : TextFormat
- hint (inHint:String)
- The hint text.
- text (inText:String)
- The text of the HintedInputField.
- hintFormat (inFormat:TextFormat)
- The TextFormat of the hint state.
Instance properties inherited from InputField
Instance properties inherited from EventMovieClip
Instance methods
- getValue : Object
- IValidate implementation: Returns the contents of the text field.
Instance methods inherited from InputField
Event handlers
- onChangeTextFocus (inFocus:Boolean) : Void
- Triggered by input field.
Event handlers inherited from InputField
Constructor
HintedInputField
function HintedInputField (
)
Instance properties
hint
hint
(read,write)
The hint text.
hintFormat
hintFormat
(write)
The TextFormat of the hint state.
mHint
private mHint:String
(read)
mHintFormat
private mHintFormat:TextFormat
(read)
mTrimmedHint
private mTrimmedHint:String
(read)
text
text
(read,write)
The text of the HintedInputField.
Instance methods
getValue
function getValue (
) : Object
IValidate implementation: Returns the contents of the text field.
Overrides:
Specified by:
Event handlers
onChangeTextFocus
function onChangeTextFocus (
inFocus:Boolean) : Void
Triggered by input field.
Parameters:
inFocus:
Overrides: