Package | com.ghostwire.ui.controls |
Class | public class uiTextInput |
Inheritance | uiTextInput ![]() ![]() ![]() |
Subclasses | uiComboBox, uiStepperInput |
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
Property | Defined by | ||
---|---|---|---|
![]() | alignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
| uiComponent | |
![]() | alignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
| uiComponent | |
![]() | background : Object
Indicates the style of the background for this component.
| uiComponent | |
![]() | container : uiComponent
Indicates the
uiComponent instance that contains this instance. | uiComponent | |
![]() | defaultEmbedFonts : Boolean [static]
Deprecated.
| uiText | |
![]() | depth : int
Indicates how deep the component is in the containment hierarchy.
| uiComponent | |
![]() | desiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
| uiComponent | |
![]() | desiredAllocationWidth : 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 | ||
![]() | ellipsis : String = "..." [static]
Indicates the string to use as an ellipsis if
ellipsize is set to true . | uiText | |
ellipsize : Boolean
Always false.
| uiTextInput | ||
![]() | embedFonts : Boolean
Indicates whether this
uiText object should use embedded fonts. | uiText | |
![]() | enabled : Boolean
Indicates whether the component is enabled for user interaction.
| uiComponent | |
![]() | fillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
horizontal space.
| uiComponent | |
![]() | fillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
vertical space.
| uiComponent | |
![]() | focusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus
rectangle.
| uiComponent | |
![]() | focusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it
is in focus.
| uiComponent | |
![]() | height : 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 | ||
![]() | html : Boolean
Indicates whether the text is HTML enabled.
| uiText | |
imeMode : String
Indicates the mode of the input method editor (IME).
| uiTextInput | ||
![]() | margin : Object
Indicates the thickness of the space surrounding the component.
| uiComponent | |
![]() | maxHeight : int
Indicates the upper limit for
height . | uiComponent | |
![]() | maxWidth : int
Indicates the upper limit for
width . | uiComponent | |
![]() | minHeight : int
Indicates the lower limit for
height . | uiComponent | |
![]() | minWidth : int
Indicates the lower limit for
width . | uiComponent | |
![]() | padding : 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 | ||
![]() | selectable : Boolean
Indicates whether the text is selectable.
| uiText | |
![]() | skin : String
Indicates the name of the skin to use for this component instance.
| uiComponent | |
![]() | stretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this
component.
| uiComponent | |
![]() | text : String
Indicates the current text displayed by the component.
| uiText | |
![]() | textField : TextField
Indicates the native Flash Player
TextField object embedded in this uiText
instance. | uiText | |
![]() | textStyle : String
Indicates the style to use for
uiText instances contained in this component. | uiComponent | |
![]() | toolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers
over this control.
| uiComponent | |
![]() | uiskin : uiBitmapImage
Returns the
uiBitmapImage rendered as the skin - for advanced users only. | uiComponent | |
![]() | visible : Boolean
Indicates whether or not the component is visible within its container.
| uiComponent | |
![]() | width : Number
Indicates the current
width of the component. | uiComponent | |
![]() | wrap : Boolean
Indicates whether the text should wrap.
| uiText |
Method | Defined by | ||
---|---|---|---|
uiTextInput(txt:String = "")
Constructor - creates a new
uiTextInput instance. | uiTextInput | ||
![]() |
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
| uiComponent | |
![]() |
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
| uiComponent | |
![]() |
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
| uiComponent | |
![]() |
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 | |
![]() |
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified
width and height . | uiComponent | |
![]() |
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
| uiComponent | |
![]() |
validateNow():void
Validates and render the component instance, and any component instances with
depth higher than itself in the validation queue, immediately. | uiComponent |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when the text in the component changes. | uiTextInput | |||
![]() |
Dispatched when the component's visible property is changed from true to
false via calling the setVisible() method. | uiComponent | ||
![]() |
Dispatched when the component's position within its parent container has changed via calling the
move() method. | uiComponent | ||
![]() |
Dispatched when the component's size has changed via calling the setSize() method. | uiComponent | ||
![]() |
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 |
displayAsPassword | property |
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
.
public function get displayAsPassword():Boolean
public function set displayAsPassword(value:Boolean):void
editable | property |
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
ellipsize | property |
ellipsize:Boolean
[read-write]Always false.
Implementation public function get ellipsize():Boolean
public function set ellipsize(value:Boolean):void
hint | property |
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
.
public function get hint():String
public function set hint(value:String):void
imeMode | property |
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
restrict | property |
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
.
public function get restrict():String
public function set restrict(value:String):void
uiTextInput | () | constructor |
public function uiTextInput(txt:String = "")
Constructor - creates a new uiTextInput
instance.
txt:String (default = " ") — A String value indicating the initial text to display.
|
change | event |
textInput | event |
flash.events.TextEvent
Dispatched when the user enters, deletes, or pastes text into the component.