Packagespark.core
Interfacepublic interface IEditableText extends IDisplayText, flash.events.IEventDispatcher
Implementors RichEditableText, StyleableTextField

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

The IEditableText interface defines the properties and methods for editable text.



Public Properties
 PropertyDefined By
  accessibilityProperties : AccessibilityProperties
IEditableText
  displayAsPassword : Boolean
IEditableText
  editable : Boolean
Flag that indicates whether the text is editable.
IEditableText
  enabled : Boolean
Whether the component can accept user interaction.
IEditableText
  focusEnabled : Boolean
Indicates whether the component can receive focus when tabbed to.
IEditableText
  horizontalScrollPosition : Number
The horizontal scroll position of the text.
IEditableText
 InheritedisTruncated : Boolean
[read-only] A flag that indicates whether the text has been truncated.
IDisplayText
  lineBreak : String
Controls word wrapping within the text.
IEditableText
  maxChars : int
IEditableText
  multiline : Boolean
IEditableText
  restrict : String
IEditableText
  selectable : Boolean
IEditableText
  selectionActivePosition : int
[read-only] The active, or last clicked position, of the selection.
IEditableText
  selectionAnchorPosition : int
[read-only] The anchor, or first clicked position, of the selection.
IEditableText
  tabIndex : int
IEditableText
 Inheritedtext : String
The text displayed by this text component.
IDisplayText
  verticalScrollPosition : Number
The vertical scroll position of the text.
IEditableText
Public Methods
 MethodDefined By
  
appendText(text:String):void
Appends the specified text to the end of the text component, as if you had clicked at the end and typed.
IEditableText
  
insertText(text:String):void
Inserts the specified text into the text component as if you had typed it.
IEditableText
  
scrollToRange(anchorPosition:int, activePosition:int):void
Scroll so the specified range is in view.
IEditableText
  
selectAll():void
Selects all of the text.
IEditableText
  
selectRange(anchorIndex:int, activeIndex:int):void
Selects a specified range of characters.
IEditableText
  
setFocus():void
Set focus to this text field.
IEditableText
Property Detail
accessibilityPropertiesproperty
accessibilityProperties:AccessibilityProperties

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0


Implementation
    public function get accessibilityProperties():AccessibilityProperties
    public function set accessibilityProperties(value:AccessibilityProperties):void
displayAsPasswordproperty 
displayAsPassword:Boolean

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0


Implementation
    public function get displayAsPassword():Boolean
    public function set displayAsPassword(value:Boolean):void
editableproperty 
editable:Boolean

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Flag that indicates whether the text is editable.

The default value is false.


Implementation
    public function get editable():Boolean
    public function set editable(value:Boolean):void
enabledproperty 
enabled:Boolean

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Whether the component can accept user interaction. After setting the enabled property to false, some components still respond to mouse interactions such as mouseOver. As a result, to fully disable UIComponents, you should also set the value of the mouseEnabled property to false. If you set the enabled property to false for a container, Flex dims the color of the container and of all of its children, and blocks user input to the container and to all of its children.


Implementation
    public function get enabled():Boolean
    public function set enabled(value:Boolean):void
focusEnabledproperty 
focusEnabled:Boolean

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Indicates whether the component can receive focus when tabbed to. You can set focusEnabled to false when a UIComponent is used as a subcomponent of another component so that the outer component becomes the focusable entity. If this property is false, focus is transferred to the first parent that has focusEnable set to true.

The default value is true, except for the spark.components.Scroller component. For that component, the default value is false.


Implementation
    public function get focusEnabled():Boolean
    public function set focusEnabled(value:Boolean):void
horizontalScrollPositionproperty 
horizontalScrollPosition:Number

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

The horizontal scroll position of the text.


Implementation
    public function get horizontalScrollPosition():Number
    public function set horizontalScrollPosition(value:Number):void
lineBreakproperty 
lineBreak:String

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Controls word wrapping within the text. This property corresponds to the lineBreak style.


Implementation
    public function get lineBreak():String
    public function set lineBreak(value:String):void

See also

maxCharsproperty 
maxChars:int

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0


Implementation
    public function get maxChars():int
    public function set maxChars(value:int):void
multilineproperty 
multiline:Boolean

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0


Implementation
    public function get multiline():Boolean
    public function set multiline(value:Boolean):void
restrictproperty 
restrict:String

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0


Implementation
    public function get restrict():String
    public function set restrict(value:String):void
selectableproperty 
selectable:Boolean

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0


Implementation
    public function get selectable():Boolean
    public function set selectable(value:Boolean):void
selectionActivePositionproperty 
selectionActivePosition:int  [read-only]

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

The active, or last clicked position, of the selection. If the implementation does not support selection anchor this is the last character of the selection.


Implementation
    public function get selectionActivePosition():int
selectionAnchorPositionproperty 
selectionAnchorPosition:int  [read-only]

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

The anchor, or first clicked position, of the selection. If the implementation does not support selection anchor this is the first character of the selection.


Implementation
    public function get selectionAnchorPosition():int
tabIndexproperty 
tabIndex:int

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0


Implementation
    public function get tabIndex():int
    public function set tabIndex(value:int):void
verticalScrollPositionproperty 
verticalScrollPosition:Number

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

The vertical scroll position of the text.


Implementation
    public function get verticalScrollPosition():Number
    public function set verticalScrollPosition(value:Number):void
Method Detail
appendText()method
public function appendText(text:String):void

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Appends the specified text to the end of the text component, as if you had clicked at the end and typed.

An insertion point is then set after the new text. If necessary, the text will scroll to ensure that the insertion point is visible.

Parameters

text:String — The text to be appended.

insertText()method 
public function insertText(text:String):void

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Inserts the specified text into the text component as if you had typed it.

If a range was selected, the new text replaces the selected text. If there was an insertion point, the new text is inserted there.

An insertion point is then set after the new text. If necessary, the text will scroll to ensure that the insertion point is visible.

Parameters

text:String — The text to be inserted.

scrollToRange()method 
public function scrollToRange(anchorPosition:int, activePosition:int):void

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Scroll so the specified range is in view.

Parameters

anchorPosition:int — The anchor position of the selection range.
 
activePosition:int — The active position of the selection range.

selectAll()method 
public function selectAll():void

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Selects all of the text.

selectRange()method 
public function selectRange(anchorIndex:int, activeIndex:int):void

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Selects a specified range of characters.

If either position is negative, it will deselect the text range.

Parameters

anchorIndex:int — The character position specifying the end of the selection that stays fixed when the selection is extended.
 
activeIndex:int — The character position specifying the end of the selection that moves when the selection is extended.

setFocus()method 
public function setFocus():void

Language Version : ActionScript 3.0
Product Version : Flex 4.5
Runtime Versions : Flash Player 10.1, AIR 2.0

Set focus to this text field.