Packageardisia.components.textInput
Classpublic class TextInput
InheritanceTextInput Inheritance spark.components.TextInput

TextInput that adds support for an icon in the text input and a clear button that is displayed when the text property is non-null.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML Propertytext



Public Properties
 PropertyDefined By
  hideClearButtonOnFocusOut : Boolean
When true, on focusOut, even if text is still displayed in this control, the optional clear button part will be hidden.
TextInput
Public Methods
 MethodDefined By
  
dispose():void
Removes the component from the display list, removes any latent event listeners, and disposes of any BitmapData.
TextInput
Protected Methods
 MethodDefined By
  
clearButtonPartHandler(event:Event):void
Handles events on the clear button skin part.
TextInput
  
eventHandler(event:Event):void
Handles events on this control.
TextInput
  
Update the clear button skin part.
TextInput
  
Update the icon skin part.
TextInput
Events
 Event Summary Defined By
  Dispatched when the optional clear button part is clicked and the text is cleared.TextInput
Styles
 Style Description Defined By
  
iconClass
Type: Class CSS Inheritance: no
Embedded graphics class for the icon. Expects the data in a format that a BitmapImage element will understand. The default value is see defaults.css.
TextInput
  
iconPaddingBottom
Type: Number CSS Inheritance: no
Icon bottom padding. The default value is 0.
TextInput
  
iconPaddingLeft
Type: Number CSS Inheritance: no
Icon left padding. The default value is 2.
TextInput
  
iconPaddingRight
Type: Number CSS Inheritance: no
Icon right padding. The default value is 0.
TextInput
  
iconPaddingTop
Type: Number CSS Inheritance: no
Icon top padding. The default value is 1.
TextInput
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
clearButtonPart:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
Displays a button that when clicked will clear the text value.
TextInput
  
iconPart:spark.primitives.BitmapImage
Required: false Part Type: Static
Displays an icon in the field.
TextInput
Property Detail
hideClearButtonOnFocusOutproperty
hideClearButtonOnFocusOut:Boolean

When true, on focusOut, even if text is still displayed in this control, the optional clear button part will be hidden.

In other words, if true, the clear button part will only be displayed if the control has focus.

The default value is true.


Implementation
    public function get hideClearButtonOnFocusOut():Boolean
    public function set hideClearButtonOnFocusOut(value:Boolean):void
Method Detail
clearButtonPartHandler()method
protected function clearButtonPartHandler(event:Event):void

Handles events on the clear button skin part.

Parameters

event:Event — the Event that triggered the handler

dispose()method 
public function dispose():void

Removes the component from the display list, removes any latent event listeners, and disposes of any BitmapData.

eventHandler()method 
protected function eventHandler(event:Event):void

Handles events on this control.

Parameters

event:Event — the Event that triggered the handler

updateClearButtonPart()method 
protected function updateClearButtonPart():void

Update the clear button skin part.

updateIconPart()method 
protected function updateIconPart():void

Update the icon skin part.

Event Detail
clear Event
Event Object Type: ardisia.components.textInput.events.TextInputEvent
TextInputEvent.type property = ardisia.components.textInput.events.TextInputEvent

Dispatched when the optional clear button part is clicked and the text is cleared.