| Package | qnx.ui.text |
| Class | public class TextInputIMF |
| Inheritance | TextInputIMF SkinnableComponent UIComponent flash.display.MovieClip |
| Property | Defined By | ||
|---|---|---|---|
| autoCapitalize : String | TextInputIMF | ||
| autoCorrect : Boolean | TextInputIMF | ||
| autoSize : String Deprecated: Deprecated as of version 1.0.1. Value is ignored.
Gets or sets a String that indicates how a label is sized and aligned to fit the value of its text property. | TextInputIMF | ||
| clearIconMode : int
Gets or sets a value that determines how the clear button appears in the text field. | TextInputIMF | ||
![]() | containment : String
Gets or sets a property that determines how a component is contained within a parent container. | UIComponent | |
| displayAsPassword : Boolean
Gets or sets a Boolean that determines whether text should be masked. | TextInputIMF | ||
| editing : Boolean [read-only] | TextInputIMF | ||
| embedFonts : Boolean
Gets or sets the embedFonts property of the internal TextField of the label. | TextInputIMF | ||
| format : TextFormat
Gets or sets the TextFormat object of the label. | TextInputIMF | ||
| keyboardType : String
The virtual keyboard type to use when this text input has focus. | TextInputIMF | ||
| leftIcon : DisplayObject
Gets or sets the left icon for the TextInput component. | TextInputIMF | ||
| leftIconMode : int
Gets or sets a value that controls how the left icon is displayed in the text field. | TextInputIMF | ||
| length : int [read-only] | TextInputIMF | ||
| maxChars : int
Gets or sets the maximum number of characters that the text field can contain, as entered by a user. | TextInputIMF | ||
| prompt : String
Gets or sets the placeholder text that is displayed in the text field when
there is no other text in the text field. | TextInputIMF | ||
| restrict : String
Gets or sets the restrict property of the internal TextField. | TextInputIMF | ||
| returnKeyDisable : Boolean
When set to true the virtual keyboard return key is disabled, when this text input has focus. | TextInputIMF | ||
| returnKeyType : String
The virtual keyboard enter key type to use when this text input has focus. | TextInputIMF | ||
| rightIcon : DisplayObject
Gets or sets the right icon for the TextInput component. | TextInputIMF | ||
| rightIconMode : int
Gets or sets a value that controls how the right icon is displayed in the text field. | TextInputIMF | ||
| selected : Boolean [read-only] | TextInputIMF | ||
| selectionActiveIndex : int [read-only] | TextInputIMF | ||
| selectionAnchorIndex : int [read-only] | TextInputIMF | ||
![]() | size : Number
Gets or sets the size for this component (as a percentage of the
container's size, or in pixels). | UIComponent | |
![]() | sizeMode : String
Gets or sets the size mode for this component. | UIComponent | |
![]() | sizeUnit : String
Gets or sets the unit of measure for the size property. | UIComponent | |
| spellCheck : Boolean | TextInputIMF | ||
| text : String
Gets or sets the text String of the label. | TextInputIMF | ||
| textHeight : int [read-only]
Returns the height of the text in the label (in pixels). | TextInputIMF | ||
| textWidth : int [read-only]
Returns the width of the text in the label (in pixels). | TextInputIMF | ||
| Property | Defined By | ||
|---|---|---|---|
| label_txt : SingleLineEditableText | TextInputIMF | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a TextInputIMF instance. | TextInputIMF | ||
![]() | destroy():void
Call this method when you want to have your object collected by the garbage collector. | UIComponent | |
![]() | drawNow():void
Calls the draw() method. | UIComponent | |
getLeftIconRect():Rectangle
Gets the position and size of the left icon. | TextInputIMF | ||
getRightIconRect():Rectangle
Gets the position and size of the right icon. | TextInputIMF | ||
hasFocus():Boolean
Returns true if the component currently has focus. | TextInputIMF | ||
![]() | invalidate(property:String = all, invalidateNow:Boolean = false):void
Marks the property as invalid and the draw() method is called on the next frame or the next render, whichever comes first. | UIComponent | |
replaceText(start:int, end:int, value:String):void | TextInputIMF | ||
![]() | setPosition(x:Number, y:Number):void
Sets the x and y position of the component. | UIComponent | |
setSelection(anchorIndex:int, activeIndex:int):void | TextInputIMF | ||
![]() | setSize(w:Number, h:Number):void
Sets the width and height of the component. | UIComponent | |
![]() | setSkin(cellSkin:Object):void
Set the skin object on the component for it to render. | SkinnableComponent | |
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the text in the input field is modified. | TextInputIMF | |||
| autoCapitalize | property |
autoCapitalize:String public function get autoCapitalize():String public function set autoCapitalize(value:String):void| autoCorrect | property |
autoCorrect:Boolean public function get autoCorrect():Boolean public function set autoCorrect(value:Boolean):void| autoSize | property |
autoSize:String
Gets or sets a String that indicates how a label is sized and aligned to fit the value of its text property.
NOTE: This value is deprecated and its value is ignored.
The following are valid values:
TextFieldAutoSize.NONE: The label is not resized or aligned to fit the text.TextFieldAutoSize.LEFT: The right and bottom sides of the label are resized to fit the text. The left and top sides are not resized.TextFieldAutoSize.CENTER: The left and right sides of the label resize to fit the text. The horizontal center of the label stays anchored at its original horizontal center position.TextFieldAutoSize.RIGHT: The left and bottom sides of the label are resized to fit the text. The top and right sides are not resized. The default value is The default value is .TextFieldAutoSize.NONE.
public function get autoSize():String public function set autoSize(value:String):void| clearIconMode | property |
clearIconMode:intGets or sets a value that determines how the clear button appears in the text field.
public function get clearIconMode():int public function set clearIconMode(value:int):voidSee also
| displayAsPassword | property |
displayAsPassword:BooleanGets or sets a Boolean that determines whether text should be masked.
When set to true, any character entered into the TextInput instance will appear as
an asterisk.
public function get displayAsPassword():Boolean public function set displayAsPassword(value:Boolean):void| editing | property |
editing:Boolean [read-only] public function get editing():Boolean| embedFonts | property |
embedFonts:Boolean
Gets or sets the embedFonts property of the internal TextField of the label.
When set to false, fonts are rendered as device fonts.
When set to true, you must specify a font using the font property of a TextFormat object and set it to the format property.
This font must be included in the in your application. If it is not included, the text will not be rendererd.
The default value is false.
public function get embedFonts():Boolean public function set embedFonts(value:Boolean):void| format | property |
format:TextFormat
Gets or sets the TextFormat object of the label.
The TextFormat object is used to format and style the text of the label.
The label has the following default text format:
format.size = 16;format.font = "BBAlpha Sans";format.color = 0xFFFFFF;
In the following listing, a TextFormat object is created and applied to the TextInput
field by setting the format property.
var myFormat:TextFormat = new TextFormat();
myFormat.size = 18;
myFormat.italic = true;
myFormat.bold = true;
myInput = new TextInput();
myInput.setPosition(200, 200);
myInput.width = 300;
myInput.format = myFormat;
this.addChild(myInput);
public function get format():TextFormat public function set format(value:TextFormat):void| keyboardType | property |
keyboardType:StringThe virtual keyboard type to use when this text input has focus.
When the user touches a TextInput instance and the TextInput gains focus, a virtual keyboard
slides in from the bottom of the screen. You can set the KeyboardType property to define the keyboard layout type that best suits the type of data that the
TextInput instance will contain. The following virutal keyboard appears by default:
public function get keyboardType():String public function set keyboardType(value:String):voidSee also
| label_txt | property |
protected var label_txt:SingleLineEditableText| leftIcon | property |
leftIcon:DisplayObject
Gets or sets the left icon for the TextInput component.
The icon is sized and positioned according to the value that is returned from the getLeftIconRect method.
public function get leftIcon():DisplayObject public function set leftIcon(value:DisplayObject):voidSee also
| leftIconMode | property |
leftIconMode:intGets or sets a value that controls how the left icon is displayed in the text field.
public function get leftIconMode():int public function set leftIconMode(value:int):voidSee also
| length | property |
length:int [read-only] public function get length():int| maxChars | property |
maxChars:int
Gets or sets the maximum number of characters that the text field can contain, as entered by a user. A script can insert more text than
maxChars allows; the maxChars property indicates only how much text a user can enter. If the value of
this property is 0, a user can enter an unlimited amount of text.
The default value is 0.
public function get maxChars():int public function set maxChars(value:int):void| prompt | property |
prompt:StringGets or sets the placeholder text that is displayed in the text field when there is no other text in the text field.
public function get prompt():String public function set prompt(value:String):void| restrict | property |
restrict:String
Gets or sets the restrict property of the internal TextField. For more information, see Adobe's TextField ActionScript 3 reference.
public function get restrict():String public function set restrict(value:String):void| returnKeyDisable | property |
returnKeyDisable:Boolean
When set to true the virtual keyboard return key is disabled, when this text input has focus.
public function get returnKeyDisable():Boolean public function set returnKeyDisable(value:Boolean):void| returnKeyType | property |
returnKeyType:StringThe virtual keyboard enter key type to use when this text input has focus.
public function get returnKeyType():String public function set returnKeyType(value:String):voidSee also
| rightIcon | property |
rightIcon:DisplayObject
Gets or sets the right icon for the TextInput component.
The icon is sized and positioned according to the value that is returned from the getRightIconRect method.
public function get rightIcon():DisplayObject public function set rightIcon(value:DisplayObject):voidSee also
| rightIconMode | property |
rightIconMode:intGets or sets a value that controls how the right icon is displayed in the text field.
public function get rightIconMode():int public function set rightIconMode(value:int):voidSee also
| selected | property |
selected:Boolean [read-only] public function get selected():Boolean| selectionActiveIndex | property |
selectionActiveIndex:int [read-only] public function get selectionActiveIndex():int| selectionAnchorIndex | property |
selectionAnchorIndex:int [read-only] public function get selectionAnchorIndex():int| spellCheck | property |
spellCheck:Boolean public function get spellCheck():Boolean public function set spellCheck(value:Boolean):void| text | property |
text:StringGets or sets the text String of the label.
public function get text():String public function set text(value:String):void| textHeight | property |
textHeight:int [read-only] Returns the height of the text in the label (in pixels).
public function get textHeight():int| textWidth | property |
textWidth:int [read-only] Returns the width of the text in the label (in pixels).
public function get textWidth():int| TextInputIMF | () | Constructor |
public function TextInputIMF()
Creates a TextInputIMF instance.
| getLeftIconRect | () | method |
public function getLeftIconRect():RectangleGets the position and size of the left icon.
ReturnsRectangle — Returns the rectangle in which the left icon occupies.
|
See also
| getRightIconRect | () | method |
public function getRightIconRect():RectangleGets the position and size of the right icon.
ReturnsRectangle — Returns the rectangle in which the right icon occupies.
|
See also
| hasFocus | () | method |
public function hasFocus():BooleanReturns true if the component currently has focus. This should be used instead of checking stage.focus as children of this component may have focus.
ReturnsBoolean |
| replaceText | () | method |
public function replaceText(start:int, end:int, value:String):voidParameters
start:int | |
end:int | |
value:String |
| setSelection | () | method |
public function setSelection(anchorIndex:int, activeIndex:int):voidParameters
anchorIndex:int | |
activeIndex:int |
| change | Event |
flash.events.Eventflash.events.Event.CHANGEDispatched when the text in the input field is modified.