Paket | mx.core |
Gränssnitt | public interface ITextInput extends IDataRenderer , IDropInListItemRenderer , IFocusManagerComponent , IFontContextComponent , IIMESupport , IListItemRenderer , IUIComponent , IInvalidating , IStyleClient , IEventDispatcher , IFlexDisplayObject , ILayoutManagerClient , ISimpleStyleClient , IFlexDisplayObject , ISimpleStyleClient , IBitmapDrawable |
Implementorer | MXFTETextInput, TextInput |
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Egenskap | Definieras med | ||
---|---|---|---|
accessibilityProperties : AccessibilityProperties
De nuvarande hjälpmedelsalternativen för det här visningsobjektet. | IFlexDisplayObject | ||
alpha : Number
Anger det angivna objektets alfagenomskinlighetsvärde. | IFlexDisplayObject | ||
baselinePosition : Number [skrivskyddad]
The y-coordinate of the baseline
of the first line of text of the component. | IUIComponent | ||
blendMode : String
Ett värde från klassen BlendMode som anger vilket blandningsläge som ska användas. | IFlexDisplayObject | ||
cacheAsBitmap : Boolean
Om det är true, sparar Flash-miljöerna en intern bitmappsrepresentation av visningsobjektet i cache-minnet. | IFlexDisplayObject | ||
className : String [skrivskyddad]
The name of the component class. | IStyleClient | ||
data : Object
The data to render or edit. | IDataRenderer | ||
document : Object
A reference to the document object associated with this component. | IUIComponent | ||
editable : Boolean
Indicates whether the user is allowed to edit the text in this control. | ITextInput | ||
enabled : Boolean
Whether the component can accept user interaction. | IUIComponent | ||
enableIME : Boolean [skrivskyddad]
Specifies whether the IME should be enabled when
this component has focus. | IIMESupport | ||
explicitHeight : Number
The explicitly specified height for the component,
in pixels, as the component's coordinates. | IUIComponent | ||
explicitMaxHeight : Number [skrivskyddad]
Number that specifies the maximum height of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
explicitMaxWidth : Number [skrivskyddad]
Number that specifies the maximum width of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
explicitMinHeight : Number [skrivskyddad]
Number that specifies the minimum height of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
explicitMinWidth : Number [skrivskyddad]
Number that specifies the minimum width of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
explicitWidth : Number
The explicitly specified width for the component,
in pixels, as the component's coordinates. | IUIComponent | ||
filters : Array
En indexerad array som innehåller varje filterobjekt som är associerat med visningsobjektet. | IFlexDisplayObject | ||
focusEnabled : Boolean
A flag that indicates whether the component can receive focus when selected. | IFocusManagerComponent | ||
focusPane : Sprite
A single Sprite object that is shared among components
and used as an overlay for drawing the focus indicator. | IUIComponent | ||
fontContext : IFlexModuleFactory
The module factory that provides the font context for this component. | IFontContextComponent | ||
hasFocusableChildren : Boolean
A flag that indicates whether child objects can receive focus. | IFocusManagerComponent | ||
height : Number
Anger visningsobjektets höjd i pixlar. | IFlexDisplayObject | ||
horizontalScrollPosition : Number
Pixel position in the content area of the leftmost pixel
that is currently displayed. | ITextInput | ||
imeMode : String
The IME mode of the component. | IIMESupport | ||
includeInLayout : Boolean
Specifies whether this component is included in the layout of the
parent container. | IUIComponent | ||
inheritingStyles : Object
An object containing the inheritable styles for this component. | IStyleClient | ||
initialized : Boolean
A flag that determines if an object has been through all three phases
of layout validation (provided that any were required)
This flag should only be modified by the LayoutManager. | ILayoutManagerClient | ||
isPopUp : Boolean
Set to true by the PopUpManager to indicate
that component has been popped up. | IUIComponent | ||
listData : BaseListData
Implements the listData property
using setter and getter methods. | IDropInListItemRenderer | ||
loaderInfo : LoaderInfo [skrivskyddad]
Returnerar ett LoaderInfo-objekt som innehåller information om hur filen som visningsobjektet tillhör ska läsas in. | IFlexDisplayObject | ||
mask : DisplayObject
Det anropande visningsobjektet maskeras av det angivna visningsobjektet. | IFlexDisplayObject | ||
maxChars : int
Maximum number of characters that users can enter in the text field. | ITextInput | ||
maxHeight : Number [skrivskyddad]
Number that specifies the maximum height of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
maxWidth : Number [skrivskyddad]
Number that specifies the maximum width of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
measuredHeight : Number [skrivskyddad]
The measured height of this object. | IFlexDisplayObject | ||
measuredMinHeight : Number
The default minimum height of the component, in pixels. | IUIComponent | ||
measuredMinWidth : Number
The default minimum width of the component, in pixels. | IUIComponent | ||
measuredWidth : Number [skrivskyddad]
The measured width of this object. | IFlexDisplayObject | ||
minHeight : Number [skrivskyddad]
Number that specifies the minimum height of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
minWidth : Number [skrivskyddad]
Number that specifies the minimum width of the component,
in pixels, as the component's coordinates. | IUIComponent | ||
mouseChildren : Boolean
Avgör om objektets underordnade objekt är aktiverade för en mus eller annan användarindataenhet (eller inte). | ITextInput | ||
mouseEnabled : Boolean
Anger om det här objektet tar emot musmeddelanden eller annan indata från användaren. | ITextInput | ||
mouseFocusEnabled : Boolean [skrivskyddad]
A flag that indicates whether the component can receive focus
when selected with the mouse. | IFocusManagerComponent | ||
mouseX : Number [skrivskyddad]
Anger x-koordinaten för musens eller användarens indataenhets position i pixlar. | IFlexDisplayObject | ||
mouseY : Number [skrivskyddad]
Anger y-koordinaten för musens eller användarens indataenhets position i pixlar. | IFlexDisplayObject | ||
name : String
Anger instansnamnet för DisplayObject. | IFlexDisplayObject | ||
nestLevel : int
The top-level SystemManager has a nestLevel of 1. | ILayoutManagerClient | ||
nonInheritingStyles : Object
An object containing the noninheritable styles for this component. | IStyleClient | ||
opaqueBackground : Object
Anger om visningsobjektet är ogenomskinligt med en viss bakgrundsfärg. | IFlexDisplayObject | ||
owner : DisplayObjectContainer
The owner of this IVisualElement object. | IUIComponent | ||
parent : DisplayObjectContainer [skrivskyddad]
Anger DisplayObjectContainer-objektet som innehåller visningsobjektet. | IFlexDisplayObject | ||
parentDrawsFocus : Boolean
If true, calls to this control's drawFocus() method are forwarded
to its parent's drawFocus() method. | ITextInput | ||
percentHeight : Number
Number that specifies the height of a component as a
percentage of its parent's size. | IUIComponent | ||
percentWidth : Number
Number that specifies the width of a component as a
percentage of its parent's size. | IUIComponent | ||
processedDescriptors : Boolean
Set to true after immediate or deferred child creation,
depending on which one happens. | ILayoutManagerClient | ||
restrict : String
Indicates the set of characters that a user can enter into the control. | ITextInput | ||
root : DisplayObject [skrivskyddad]
För ett visningsobjekt i en inläst SWF-fil är rotegenskapen det översta visningsobjektet i den del av visningslistans trädstruktur som representeras av den SWF-filen. | IFlexDisplayObject | ||
rotation : Number
Anger DisplayObject-instansens rotation i grader från den ursprungliga orienteringen. | IFlexDisplayObject | ||
scale9Grid : Rectangle
Det skalningsrutnät som används för närvarande. | IFlexDisplayObject | ||
scaleX : Number
Anger vågrät skala (i procent) för objektet utifrån dess registreringspunkt. | IFlexDisplayObject | ||
scaleY : Number
Anger lodrät skala (i procent) för objektet utifrån dess registreringspunkt. | IFlexDisplayObject | ||
scrollRect : Rectangle
Visningsobjektets gränser för rullningsrektangeln. | IFlexDisplayObject | ||
selectable : Boolean
A flag indicating whether the text in the TextInput can be selected. | ITextInput | ||
selectionActivePosition : int [skrivskyddad]
The zero-based index of the position after the last character
in the current selection (equivalent to the one-based index of the last
character). | ITextInput | ||
selectionAnchorPosition : int [skrivskyddad]
The zero-based character index value of the first character
in the current selection. | ITextInput | ||
stage : Stage [skrivskyddad]
Visningsobjektets scen. | IFlexDisplayObject | ||
styleDeclaration : CSSStyleDeclaration
The style declaration that holds the inline styles declared by this
object. | IStyleClient | ||
styleName : Object
The source of this object's style values. | ISimpleStyleClient | ||
systemManager : ISystemManager
A reference to the SystemManager object for this component. | IUIComponent | ||
tabFocusEnabled : Boolean [skrivskyddad]
A flag that indicates whether pressing the Tab key eventually
moves focus to this component. | IFocusManagerComponent | ||
tabIndex : int
If tabFocusEnabled, the order in which the component receives focus. | IFocusManagerComponent | ||
text : String
Plain text that appears in the control. | ITextInput | ||
transform : flash.geom:Transform
Ett objekt med egenskaper som gäller ett visningsobjekts matris, färgomformning och pixelgränser. | IFlexDisplayObject | ||
tweeningProperties : Array
Used by EffectManager. | IUIComponent | ||
updateCompletePendingFlag : Boolean
A flag that determines if an object is waiting to have its
updateComplete event dispatched. | ILayoutManagerClient | ||
visible : Boolean
Om visingsobjektet är synligt eller inte. | IFlexDisplayObject | ||
width : Number
Anger visningsobjektets bredd i pixlar. | IFlexDisplayObject | ||
x : Number
Anger x-koordinaten för DisplayObject-instansen i förhållande till de lokala koordinaterna för den överordnade DisplayObjectContainer. | IFlexDisplayObject | ||
y : Number
Anger y-koordinaten för DisplayObject-instansen i förhållande till de lokala koordinaterna för den överordnade DisplayObjectContainer. | IFlexDisplayObject |
Metod | Definieras med | ||
---|---|---|---|
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | IEventDispatcher | ||
Deletes a style property from this component instance. | IStyleClient | ||
Skickar en händelse till händelseflödet. | IEventDispatcher | ||
Called by the FocusManager when the component receives focus. | IFocusManagerComponent | ||
Returnerar en rektangel som definierar visningsområdets område i relation till targetCoordinateSpace-objektets koordinatsystem. | IFlexDisplayObject | ||
Returns an Array of CSSStyleDeclaration objects for the type selector
that applies to this component, or null if none exist. | IStyleClient | ||
A convenience method for determining whether to use the
explicit or measured height
| IUIComponent | ||
A convenience method for determining whether to use the
explicit or measured width
| IUIComponent | ||
Returnerar en rektangel som definierar visningsområdets gräns, baserat på koordinatsystemet som definieras av targetCoordinateSpace-parametern, exklusive eventuella linjer i former. | IFlexDisplayObject | ||
Gets a style property that has been set anywhere in this
component's style lookup chain. | IStyleClient | ||
Konverterar punktobjektet från scenens (globala) koordinater till visningsobjektets (lokala) koordinater. | IFlexDisplayObject | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | IEventDispatcher | ||
Utvärderar begränsningsramen för visningsobjektet för att kontrollera om den överlappar eller korsar begränsningsramen för obj-visningsobjektet. | IFlexDisplayObject | ||
Utvärderar visningsobjektet för att avgöra om det överlappar eller korsar den punkt som anges av x- och y-parametrarna. | IFlexDisplayObject | ||
Initialize the object. | IUIComponent | ||
Calling this method results in a call to the component's
validateDisplayList() method
before the display list is rendered. | IInvalidating | ||
Calling this method results in a call to the component's
validateProperties() method
before the display list is rendered. | IInvalidating | ||
Calling this method results in a call to the component's
validateSize() method
before the display list is rendered. | IInvalidating | ||
Konverterar punktobjektet från visningsobjektets (lokala) koordinater till scenens (globala) koordinater. | IFlexDisplayObject | ||
Moves this object to the specified x and y coordinates. | IFlexDisplayObject | ||
Propagates style changes to the children of this component. | IStyleClient | ||
Returns true if the chain of owner properties
points from child to this UIComponent. | IUIComponent | ||
Called by Flex when a UIComponent object is added to or removed from a parent. | IUIComponent | ||
Sets up the internal style cache values so that the getStyle()
method functions. | IStyleClient | ||
Registers the EffectManager as one of the event listeners for each effect event. | IStyleClient | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | IEventDispatcher | ||
Selects the text in the range specified by the parameters. | ITextInput | ||
Sets the actual size of this object. | IFlexDisplayObject | ||
Called by the FocusManager when the component receives focus. | IFocusManagerComponent | ||
Sets a style property on this component instance. | IStyleClient | ||
Called when the visible property changes. | IUIComponent | ||
Determines whether the border and background of the TextInput are
visible. | ITextInput | ||
Called when the value of a style property is changed. | ISimpleStyleClient | ||
Validates the position and size of children and draws other
visuals. | ILayoutManagerClient | ||
Validates and updates the properties and layout of this object
by immediately calling validateProperties(),
validateSize(), and validateDisplayList(),
if necessary. | IInvalidating | ||
Validates the properties of a component. | ILayoutManagerClient | ||
Validates the measured size of the component
If the LayoutManager.invalidateSize() method is called with
this ILayoutManagerClient, then the validateSize() method
is called when it's time to do measurements. | ILayoutManagerClient | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | IEventDispatcher |
editable | egenskap |
editable:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Indicates whether the user is allowed to edit the text in this control.
If true
, the user can edit the text.
Standardvärdet är true.
Implementering
public function get editable():Boolean
public function set editable(value:Boolean):void
horizontalScrollPosition | egenskap |
horizontalScrollPosition:Number
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Pixel position in the content area of the leftmost pixel
that is currently displayed.
(The content area includes all contents of a control, not just
the portion that is currently displayed.)
This property is always set to 0, and ignores changes,
if wordWrap
is set to true
.
Standardvärdet är 0.
Implementering
public function get horizontalScrollPosition():Number
public function set horizontalScrollPosition(value:Number):void
maxChars | egenskap |
maxChars:int
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Maximum number of characters that users can enter in the text field.
This property does not limit the length of text specified by the
setting the control's text
or htmlText
property.
The default value is 0, which is a special case meaning an unlimited number.
Implementering
public function get maxChars():int
public function set maxChars(value:int):void
mouseChildren | egenskap |
mouseChildren:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Avgör om objektets underordnade objekt är aktiverade för en mus eller annan användarindataenhet (eller inte). Om ett objekt är aktiverat kan användaren interagera med det via en mus eller annan användarindataenhet. Standardvärdet är true
.
Denna egenskap är användbar när du skapar en knapp med en Sprite-klassinstans (i stället för att använda SimpleButton-klassen). När du använder en Sprite-instans för att skapa en knapp kan du välja att dekorera knappen genom att använda addChild()
-metoden för att lägga till ytterligare Sprite-instanser. Denna process kan leda till oväntat beteende med mushändelser eftersom de Sprite-instanser du lägger till som underordnade kan bli målobjektet för en mushändelse när du förväntar dig att den överordnade instansen ska vara målobjektet. För att säkerställa att den överordnade instansen används som målobjekt för mushändelser kan du sätta mouseChildren
-egenskapen för den överordnade instansen till false
.
Ingen händelse skickas när denna egenskap sätts. Du måste använda addEventListener()
-metoden för att skapa interaktiv funktionalitet.
Implementering
public function get mouseChildren():Boolean
public function set mouseChildren(value:Boolean):void
mouseEnabled | egenskap |
mouseEnabled:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Anger om det här objektet tar emot musmeddelanden eller annan indata från användaren. Standardvärdet är true
, vilket innebär att varje InteractiveObject-instans som förekommer på visningslistan tar emot mushändelser eller andra indatahändelser från användaren som standard. Om mouseEnabled
är inställt på false
, tar instansen inte emot några mushändelser (eller andra indatahändelser från användaren, t.ex. tangentbordshändelser). Eventuella underordnade till denna instans i visningslistan påverkas inte. För att ändra mouseEnabled
-beteendet för samtliga underordnade till ett objekt i visningslistan använder man flash.display.DisplayObjectContainer.mouseChildren
.
Ingen händelse skickas när denna egenskap sätts. Du måste använda addEventListener()
-metoden för att skapa interaktiv funktionalitet.
Implementering
public function get mouseEnabled():Boolean
public function set mouseEnabled(value:Boolean):void
parentDrawsFocus | egenskap |
parentDrawsFocus:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
If true, calls to this control's drawFocus()
method are forwarded
to its parent's drawFocus()
method.
This is used when a TextInput is part of a composite control
like NumericStepper or ComboBox;
Standardvärdet är false.
Implementering
public function get parentDrawsFocus():Boolean
public function set parentDrawsFocus(value:Boolean):void
restrict | egenskap |
restrict:String
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Indicates the set of characters that a user can enter into the control.
If the value of the restrict
property is null
,
you can enter any character. If the value of the restrict
property is an empty string, you cannot enter any character.
This property only restricts user interaction; a script
can put any text into the text field. If the value of
the restrict
property is a string of characters,
you may enter only characters in that string into the
text field.
Flex scans the string from left to right. You can specify a range by using the hyphen (-) character. 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.
Because some characters have a special meaning when used
in the restrict
property, you must use
backslash characters to specify the literal characters -, ^, and \.
When you use the restrict
property as an attribute
in an MXML tag, use single backslashes, as in the following
example: \^\-\\.
When you set the restrict
In and ActionScript expression,
use double backslashes, as in the following example: \\^\\-\\\.
Standardvärdet är null.
Implementering
public function get restrict():String
public function set restrict(value:String):void
Relaterade API-element
selectable | egenskap |
selectionActivePosition | egenskap |
selectionActivePosition:int
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
The zero-based index of the position after the last character
in the current selection (equivalent to the one-based index of the last
character).
If the last character in the selection, for example, is the fifth
character, this property has the value 5.
When the control gets the focus, the selection is visible if the
selectionAnchorIndex
and selectionActiveIndex
properties are both set.
Standardvärdet är 0.
Implementering
public function get selectionActivePosition():int
selectionAnchorPosition | egenskap |
selectionAnchorPosition:int
[skrivskyddad] Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
The zero-based character index value of the first character
in the current selection.
For example, the first character is 0, the second character is 1,
and so on.
When the control gets the focus, the selection is visible if the
selectionAnchorIndex
and selectionActiveIndex
properties are both set.
Standardvärdet är 0.
Implementering
public function get selectionAnchorPosition():int
text | egenskap |
text:String
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Plain text that appears in the control. Its appearance is determined by the CSS styles of this Label control.
Any HTML tags in the text string are ignored,
and appear as entered in the string.
To display text formatted using HTML tags,
use the htmlText
property instead.
If you set the htmlText
property,
the HTML replaces any text you had set using this propety, and the
text
property returns a plain-text version of the
HTML text, with all HTML tags stripped out. For more information
see the htmlText
property.
To include the special characters left angle bracket (<),
right angle bracket (>), or ampersand (&) in the text,
wrap the text string in the CDATA tag.
Alternatively, you can use HTML character entities for the
special characters, for example, <
.
If you try to set this property to null
,
it is set, instead, to the empty string.
The text
property can temporarily have the value null
,
which indicates that the htmlText
has been recently set
and the corresponding text
value
has not yet been determined.
Standardvärdet är "".
Implementering
public function get text():String
public function set text(value:String):void
selectRange | () | metod |
public function selectRange(anchorPosition:int, activePosition:int):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Selects the text in the range specified by the parameters.
Parametrar
anchorPosition:int — The zero-based character index value
of the first character in the current selection.
| |
activePosition:int — The zero-based index of the position
after the last character in the current selection
(equivalent to the one-based index of the last character).
|
showBorderAndBackground | () | metod |
public function showBorderAndBackground(visible:Boolean):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Determines whether the border and background of the TextInput are visible.
Parametrar
visible:Boolean — true if visible, and false if not.
|
Tue Jun 12 2018, 01:40 PM Z