Packagecom.ghostwire.ui.controls
Classpublic class uiTextInput
InheritanceuiTextInput Inheritance uiText Inheritance uiComponent Inheritance flash.display.Sprite
SubclassesuiComboBox, uiStepperInput

The uiTextInput component is used to display editable text.

To display multiline editable text with scrollbars, use the uiTextArea class.

"ellipsize" Property
The ellipsis and ellipsize properties inherited from uiText are not applicable (ignored) in this class. The ellipsis property always return false.

"skin" Property
The default value is "TextInput" and the asset(s) used are:

 TextInput.png
 

~ This class is available in Aspire UI Components Lite Edition ~

See also

com.ghostwire.ui.controls.uiTextArea


Public Properties
 PropertyDefined by
 InheritedalignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
uiComponent
 InheritedalignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
uiComponent
 Inheritedbackground : Object
Indicates the style of the background for this component.
uiComponent
 Inheritedcontainer : uiComponent
Indicates the uiComponent instance that contains this instance.
uiComponent
 InheriteddefaultEmbedFonts : Boolean
[static] Deprecated.
uiText
 Inheriteddepth : int
Indicates how deep the component is in the containment hierarchy.
uiComponent
 InheriteddesiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
uiComponent
 InheriteddesiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
uiComponent
  displayAsPassword : Boolean
Indicates whether the text should be shown as asterisks instead of the actual characters.
uiTextInput
  editable : Boolean
Indicates whether the text can be edited by the user.
uiTextInput
 Inheritedellipsis : String = "..."
[static] Indicates the string to use as an ellipsis if ellipsize is set to true.
uiText
  ellipsize : Boolean
Always false.
uiTextInput
 InheritedembedFonts : Boolean
Indicates whether this uiText object should use embedded fonts.
uiText
 Inheritedenabled : Boolean
Indicates whether the component is enabled for user interaction.
uiComponent
 InheritedfillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated horizontal space.
uiComponent
 InheritedfillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated vertical space.
uiComponent
 InheritedfocusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus rectangle.
uiComponent
 InheritedfocusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it is in focus.
uiComponent
 Inheritedheight : Number
Indicates the current height of the component.
uiComponent
  hint : String
Indicates the text to display in the text field when there is no input value and the instance is not in focus.
uiTextInput
 Inheritedhtml : Boolean
Indicates whether the text is HTML enabled.
uiText
  imeMode : String
Indicates the mode of the input method editor (IME).
uiTextInput
 Inheritedmargin : Object
Indicates the thickness of the space surrounding the component.
uiComponent
 InheritedmaxHeight : int
Indicates the upper limit for height.
uiComponent
 InheritedmaxWidth : int
Indicates the upper limit for width.
uiComponent
 InheritedminHeight : int
Indicates the lower limit for height.
uiComponent
 InheritedminWidth : int
Indicates the lower limit for width.
uiComponent
 Inheritedpadding : Object
Indicates the thickness of the interior space from the edge of the component to the content area, which is where child components, if any, are contained.
uiComponent
  restrict : String
Indicates the set of characters that a user can enter into the text field.
uiTextInput
 Inheritedselectable : Boolean
Indicates whether the text is selectable.
uiText
 Inheritedskin : String
Indicates the name of the skin to use for this component instance.
uiComponent
 Inheritedstretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this component.
uiComponent
 Inheritedtext : String
Indicates the current text displayed by the component.
uiText
 InheritedtextField : TextField
Indicates the native Flash Player TextField object embedded in this uiText instance.
uiText
 InheritedtextStyle : String
Indicates the style to use for uiText instances contained in this component.
uiComponent
 InheritedtoolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers over this control.
uiComponent
 Inheriteduiskin : uiBitmapImage
Returns the uiBitmapImage rendered as the skin - for advanced users only.
uiComponent
 Inheritedvisible : Boolean
Indicates whether or not the component is visible within its container.
uiComponent
 Inheritedwidth : Number
Indicates the current width of the component.
uiComponent
 Inheritedwrap : Boolean
Indicates whether the text should wrap.
uiText
Public Methods
 MethodDefined by
  
uiTextInput(txt:String = "")
Constructor - creates a new uiTextInput instance.
uiTextInput
 Inherited
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
uiComponent
 Inherited
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
uiComponent
 Inherited
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
uiComponent
 Inherited
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its tabEnabled property set to true, otherwise this method will fail silently.
uiComponent
 Inherited
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified width and height.
uiComponent
 Inherited
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
uiComponent
 Inherited
validateNow():void
Validates and render the component instance, and any component instances with depth higher than itself in the validation queue, immediately.
uiComponent
Events
 EventSummaryDefined by
   Dispatched when the text in the component changes.uiTextInput
 Inherited Dispatched when the component's visible property is changed from true to false via calling the setVisible() method.uiComponent
 Inherited Dispatched when the component's position within its parent container has changed via calling the move() method.uiComponent
 Inherited Dispatched when the component's size has changed via calling the setSize() method.uiComponent
 Inherited Dispatched when the component's visible property is changed from false to true via calling the setVisible() method.uiComponent
   Dispatched when the user enters, deletes, or pastes text into the component.uiTextInput
Property detail
displayAsPasswordproperty
displayAsPassword:Boolean  [read-write]

Indicates whether the text should be shown as asterisks instead of the actual characters. When this property is true (password mode is enabled), the Cut and Copy commands and their corresponding keyboard shortcuts will not function. This security mechanism prevents an unscrupulous user from using the shortcuts to discover a password on an unattended computer.

The default value is false.

Implementation
    public function get displayAsPassword():Boolean
    public function set displayAsPassword(value:Boolean):void
editableproperty 
editable:Boolean  [read-write]

Indicates whether the text can be edited by the user.

Implementation
    public function get editable():Boolean
    public function set editable(value:Boolean):void
ellipsizeproperty 
ellipsize:Boolean  [read-write]

Always false.

Implementation
    public function get ellipsize():Boolean
    public function set ellipsize(value:Boolean):void
hintproperty 
hint:String  [read-write]

Indicates the text to display in the text field when there is no input value and the instance is not in focus.

You can set the style for this hint text by defining a sub-style with suffix "_hint". For example, if the instance is using "inputstyle" as the textStyle, then the hint text will use "inputstyle_hint" as its textStyle.

Implementation
    public function get hint():String
    public function set hint(value:String):void
imeModeproperty 
imeMode:String  [read-write]

Indicates the mode of the input method editor (IME). The IME makes it possible for users to use a QWERTY keyboard to enter characters from the Chinese, Japanese, and Korean character sets.

The flash.system.IMEConversionMode class defines constants for the valid values for this property. Set this property to null to prevent the use of the IME with the component.

Implementation
    public function get imeMode():String
    public function set imeMode(value:String):void
restrictproperty 
restrict:String  [read-write]

Indicates the set of characters that a user can enter into the text field. If the value of the restrict property is null (default value), you can enter any character. If the value of the restrict property is an empty string, you cannot enter any character. If the value of the restrict property is a string of characters, you can enter only characters in the string into the text field. The string is scanned from left to right. You can specify a range by using the hyphen (-) character. This only restricts user interaction; a script may put any text into the text field.

If the string begins with a caret (^) character, all characters are initially accepted and succeeding characters in the string are excluded from the set of accepted characters. If the string does not begin with a caret (^) character, no characters are initially accepted and succeeding characters in the string are included in the set of accepted characters.

The following example allows only uppercase characters, spaces, and numbers to be entered into a text field:

my_txt.restrict = "A-Z 0-9";

The following example includes all characters, but excludes lowercase letters:

my_txt.restrict = "^a-z";

You can use a backslash to enter a ^ or - verbatim. The accepted backslash sequences are \-, \^ or \\. The backslash must be an actual character in the string, so when specified in ActionScript, a double backslash must be used. For example, the following code includes only the dash (-) and caret (^):

my_txt.restrict = "\\-\\^";

The ^ may be used anywhere in the string to toggle between including characters and excluding characters. The following code includes only uppercase letters, but excludes the uppercase letter Q:

my_txt.restrict = "A-Z^Q";

You can use the u escape sequence to construct restrict strings. The following code includes only the characters from ASCII 32 (space) to ASCII 126 (tilde).

my_txt.restrict = " -~";

The default value is null.

Implementation
    public function get restrict():String
    public function set restrict(value:String):void
Constructor detail
uiTextInput()constructor
public function uiTextInput(txt:String = "")

Constructor - creates a new uiTextInput instance.

Parameters
txt:String (default = "") — A String value indicating the initial text to display.
Event detail
changeevent 
Event object type: flash.events.Event

Dispatched when the text in the component changes.

textInputevent  
Event object type: flash.events.TextEvent

Dispatched when the user enters, deletes, or pastes text into the component.