qnx.fuse.ui.text.TextInput

TextInput

Properties | Methods


Packageqnx.fuse.ui.text
Classpublic class TextInput
InheritanceTextInput Inheritance TextInputBase Inheritance SkinnableComponent Inheritance UIComponent Inheritance flash.display.MovieClip

The TextInput class provides developers with a single line input field. For multiline text input use the TextArea class.

Class information:
PlayBook Tablet OS Version:   1.0.6

See also

TextArea



Public Properties

 PropertyDefined By
 InheritedautoCapitalize : String
Gets or sets a value that enables auto-capitalization when the user inputs text.
TextInputBase
 InheritedautoCorrect : Boolean
Gets or sets a value that enables auto-correct when text is entered by the user.
TextInputBase
  clearIconMode : int
Gets or sets a value that determines how the clear button appears in the text field.
TextInput
 InheriteddisableReturnKey : Boolean
Gets or sets a value that disables the return key on the soft keyboard.
TextInputBase
 InheriteddisplayAsPassword : Boolean
Gets or sets a value that determines whether text is masked (as in a password field).
TextInputBase
 Inheritededitable : Boolean
Gets or sets a value that determines if text can be modified.
TextInputBase
 InheritedexplicitHeight : Number
[read-only] Returns the explicit height (actual height, in pixels) of the UI component.
UIComponent
 InheritedexplicitWidth : Number
[read-only] Returns the explicit width (actual width, in pixels) of the UI component.
UIComponent
 Inheritedformat : TextFormat
Gets or sets the format of the text.
TextInputBase
 InheritedincludeInLayout : Boolean
Specifies whether or not the component should be included in its parent container's layout.
UIComponent
 InheritedlayoutData : Object
Returns the layout data for the object.
UIComponent
  leftIcon : DisplayObject
Gets or sets the left icon for the TextInput component.
TextInput
  leftIconMode : int
Gets or sets a value that controls how the left icon is displayed in the text field.
TextInput
 Inheritedlength : int
[read-only] Returns the length of the text that is being rendered.
TextInputBase
 Inheritedlocale : String
Gets or sets the current locale of the text.
TextInputBase
 InheritedmaxChars : int
Gets or sets the maximum number of characters that can be entered in the field.
TextInputBase
  measureContents : Boolean
When set to true layouts will measure the text or the prompt text in the component.
TextInput
 InheritedminHeight : Number
Gets or sets the minimum preferred height of the control.
UIComponent
 InheritedminWidth : Number
Gets or sets the minimum preferred width of the control.
UIComponent
  prompt : String
Gets or sets the prompt.
TextInput
  promptFontColor : uint
Gets or sets the font color of the prompt text.
TextInput
 Inheritedrestrict : String
Gets or sets the set of characters (as a String) that a user can enter into the text field.
TextInputBase
 InheritedreturnKeyLabel : String
Gets or sets the label of the return key on the soft keyboard.
TextInputBase
  rightIcon : DisplayObject
Gets or sets the right icon for the TextInput component.
TextInput
  rightIconMode : int
Gets or sets a value that controls how the right icon is displayed in the text field.
TextInput
 Inheritedselectable : Boolean
Gets or sets a value that determines whether text can be selected.
TextInputBase
 InheritedselectionActiveIndex : int
[read-only] Returns the zero-based index of the first character in the selection.
TextInputBase
 InheritedselectionAnchorIndex : int
[read-only] Returns the zero-based index of the last character in the selection.
TextInputBase
 InheritedsoftKeyboardType : String
Gets or sets the type of keyboard to be displayed when an editing session begins.
TextInputBase
 InheritedspellCheck : Boolean
Gets or sets a value that enables spell-check.
TextInputBase
 Inheritedstate : String
Gets or sets the state of the component.
SkinnableComponent
 Inheritedtext : String
Gets or sets the text of the component.
TextInputBase
  textHeight : int
[read-only] Returns the height of the text in the label (in pixels).
TextInput
  textWidth : int
[read-only] Returns the width of the text in the label (in pixels).
TextInput

Public Methods

 MethodDefined By
  
Creates a TextInput instance.
TextInput
 Inherited
childChanged(resizedChild:DisplayObject = null):Boolean
Notifies the UIComponent that one or more of its children has changed in a manner that may affect this object's layout.
UIComponent
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
  
getLeftIconRect():Rectangle
Gets the position and size of the left icon.
TextInput
  
getRightIconRect():Rectangle
Gets the position and size of the right icon.
TextInput
 Inherited
Returns the size options for the given control.
UIComponent
 Inherited
Calling this method results in a call to the components validateDisplayList() method before the display list is rendered.
UIComponent
 Inherited
Calling this method results in a call to the components validateProperties() method before the display list is rendered.
UIComponent
 Inherited
measure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
This method calls doMeasure() in order to calculate the preferred size of the control.
UIComponent
 Inherited
registerEmoticons(emoticons:Vector.<Emoticon>):void
Registers a set of emoticons with the TextField.
TextInputBase
 Inherited
replaceText(startIndex:int, endIndex:int, insert:String):void
Replaces the text between at a given start and end index.
TextInputBase
 Inherited
setActualSize(w:Number, h:Number):void
Sets the width and height of the object without setting the explicitWidth and explicitHeight.
UIComponent
 Inherited
setLayoutBounds(bounds:Rectangle):void
Sets the receiver's size and location to the rectangular area specified by the arguments.
UIComponent
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
setSelection(anchorIndex:int, activeIndex:int):void
Sets the range of selected text.
TextInputBase
 Inherited
setSkin(newSkin:Object):void
Set the skin object on the component for it to render.
SkinnableComponent
 Inherited
Validates the display list of the component by calling the updateDisplayList().
UIComponent
 Inherited
Validates the component immediately by calling validateProperties(), validateSizes(), and validateDisplayList() if necessary.
UIComponent
 Inherited
Validates the properties of the component by calling the commitProperties() method.
UIComponent

Protected Methods

 MethodDefined By
 Inherited
Process properties of the component.
UIComponent
 Inherited
Process the state of the component.
UIComponent
 Inherited
doMeasure(availableWidth:Number, availableHeight:Number):LayoutMeasurement
Performs a measurement on the control, and returns a LayoutMeasurement instance containing the available width and height within the layout.
UIComponent
 Inherited
flushCache():void
Invoked as part of parentLayoutChanged.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
Invalidates the parent's size and display list if includeInLayout property is set to true.
UIComponent
 Inherited
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Sets the size and position of the children of the component.
UIComponent
 Inherited
updateSkin(unscaledWidth:Number, unscaledHeight:Number):void
Updates the skin.
SkinnableComponent

Property Detail

clearIconMode


clearIconMode:int

Gets or sets a value that determines how the clear button appears in the text field.


Implementation

public function get clearIconMode():int
public function set clearIconMode(value:int):void

See also

TextInputIconMode

leftIcon


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.


Implementation

public function get leftIcon():DisplayObject
public function set leftIcon(value:DisplayObject):void

See also

getLeftIconRect()

leftIconMode


leftIconMode:int

Gets or sets a value that controls how the left icon is displayed in the text field.


Implementation

public function get leftIconMode():int
public function set leftIconMode(value:int):void

See also

TextInputIconMode
leftIcon

measureContents


measureContents:Boolean

When set to true layouts will measure the text or the prompt text in the component. This allows the component to grow and shrink based on how much content it has.


Implementation

public function get measureContents():Boolean
public function set measureContents(value:Boolean):void

prompt


prompt:String

Gets or sets the prompt. The prompt is shown if the component does not contain any text.


Implementation

public function get prompt():String
public function set prompt(value:String):void

promptFontColor


promptFontColor:uint

Gets or sets the font color of the prompt text. The prompt will use all of the properties of the format property except color.

The default value is 0x7f7f7f.


Implementation

public function get promptFontColor():uint
public function set promptFontColor(value:uint):void

rightIcon


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.


Implementation

public function get rightIcon():DisplayObject
public function set rightIcon(value:DisplayObject):void

See also

getRightIconRect()

rightIconMode


rightIconMode:int

Gets or sets a value that controls how the right icon is displayed in the text field.


Implementation

public function get rightIconMode():int
public function set rightIconMode(value:int):void

See also

TextInputIconMode
rightIcon

textHeight


textHeight:int  [read-only]

Returns the height of the text in the label (in pixels).


Implementation

public function get textHeight():int

textWidth


textWidth:int  [read-only]

Returns the width of the text in the label (in pixels).


Implementation

public function get textWidth():int

Constructor Detail

TextInput()


public function TextInput()

Creates a TextInput instance.

Method Detail

getLeftIconRect()


public function getLeftIconRect():Rectangle

Gets the position and size of the left icon.

Returns

Rectangle — Returns the rectangle in which the left icon occupies.

See also

leftIcon

getRightIconRect()


public function getRightIconRect():Rectangle

Gets the position and size of the right icon.

Returns

Rectangle — Returns the rectangle in which the right icon occupies.

See also

rightIcon