mx.controls
public class ComboBase
继承ComboBase Inheritance UIComponent Inheritance FlexSprite Inheritance Sprite Inheritance DisplayObjectContainer Inheritance InteractiveObject Inheritance DisplayObject Inheritance EventDispatcher Inheritance Object
实现 IIMESupport, IFocusManagerComponent
子类 ColorPicker, ComboBox, DateField

ComboBase 类是符合以下条件的控件的基类:在文本字段显示文本并且包含导致出现下拉列表的按钮,用户可在其中选择显示哪些文本。ComboBase 类不能直接用作 MXML 标签。

MXML 语法expanded隐藏 MXML 语法

The <mx:ComboBase> tag inherits all the tag attributes of its superclass, and adds the following tag attributes:

  <mx:tagname
    Properties
    dataProvider="null"
    editable="false|true"
    imeMode="null"
    restrict="null"
    selectedIndex="-1"
    selectedItem="null"
    text=""
     
    Styles
    disabledSkin="Depends on class"
    downSkin="Depends on class"
    editableDisabledSkin="Depends on class"
    editableDownSkin="Depends on class"
    editableOverSkin="Depends on class"
    editableUpSkin="Depends on class"
    overSkin="Depends on class"
    textInputStyleName="" 
    upSkin="Depends on class"
   />
  

另请参见

mx.controls.Button
mx.controls.TextInput
mx.collections.ICollectionView


公共属性
 属性定义方
 InheritedaccessibilityProperties : AccessibilityProperties
此显示对象的当前辅助功能选项。
DisplayObject
 InheritedactiveEffects : Array
[只读 (read-only)] 组件上当前播放的效果列表,如 EffectInstance 实例的 Array。
UIComponent
 Inheritedalpha : Number
指示指定对象的 Alpha 透明度值。
DisplayObject
 InheritedautomationDelegate : Object
处理自动化相关功能的委托对象。
UIComponent
 InheritedautomationName : String
可用作此对象的标识符的名称。
UIComponent
 InheritedautomationTabularData : Object
[只读 (read-only)] IAutomationTabularData 接口的实现,可用于检索数据。
UIComponent
 InheritedautomationValue : Array
[只读 (read-only)] 此值通常对应于对象的经渲染的外观,当对象在应用中以可视方式显示时,此值使标识符与该对象相关联。
UIComponent
 InheritedbaselinePosition : Number
[只读 (read-only)] 组件第一行文本的基线的 y 坐标。
UIComponent
 InheritedblendMode : String
BlendMode 类中的一个值,用于指定要使用的混合模式。
DisplayObject
 InheritedblendShader : Shader
[只写] 设置用于混合前景和背景的着色器。
DisplayObject
 InheritedbuttonMode : Boolean
指定此 sprite 的按钮模式。
Sprite
 InheritedcacheAsBitmap : Boolean
如果设置为 true,则 Flash Player 或 Adobe AIR 将缓存显示对象的内部位图表示形式。
DisplayObject
 InheritedcacheHeuristic : Boolean
[只写] 供 Flex 使用,表示建议为对象实施位图缓存。
UIComponent
 InheritedcachePolicy : String
指定此对象的位图缓存策略。
UIComponent
 InheritedclassName : String
[只读 (read-only)] 此实例的类的名称,如“Button”。
UIComponent
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
 InheritedcontentMouseX : Number
[只读 (read-only)] 返回鼠标在内容坐标系中的 x 位置。
UIComponent
 InheritedcontentMouseY : Number
[只读 (read-only)] 返回内容坐标系中鼠标的 y 位置。
UIComponent
 InheritedcontextMenu : NativeMenu
指定与此对象相关联的上下文菜单。
InteractiveObject
 InheritedcurrentState : String
组件的当前视图状态。
UIComponent
 InheritedcursorManager : ICursorManager
[只读 (read-only)] 获取控制此组件及其同级组件的光标的 CursorManager。
UIComponent
  dataProvider : Object
此组件显示的一组项目。
ComboBase
 Inheriteddescriptor : UIComponentDescriptor
引用 UIComponentDescriptor(如果有),过去曾通过 createComponentFromDescriptor() 方法使用它来创建此 UIComponent 实例。
UIComponent
 Inheriteddocument : Object
引用与此 UIComponent 相关联的文档对象。
UIComponent
 InheriteddoubleClickEnabled : Boolean
指定 UIComponent 对象是否接收 doubleClick 事件。
UIComponent
 InheriteddropTarget : DisplayObject
[只读 (read-only)] 指定拖动 sprite 时经过的显示对象,或放置 sprite 的显示对象。
Sprite
  editable : Boolean
一个标志,指示控件可编辑还是不可编辑,可编辑时允许用户直接键入未在 dataProvider 中指定的条目,不可编辑时要求用户从 dataProvider 中的项目中进行选择。
ComboBase
 Inheritedenabled : Boolean
组件是否可以接受用户交互。
UIComponent
 InheritederrorString : String
当验证程序监视组件并且验证失败时,组件的错误提示中将显示的文本。
UIComponent
 InheritedexplicitHeight : Number
指定该组件在组件坐标中显式高度(以像素为单位)的数字。
UIComponent
 InheritedexplicitMaxHeight : Number
布局过程中父级要考虑的组件最大建议高度。
UIComponent
 InheritedexplicitMaxWidth : Number
布局过程中父级要考虑的组件最大建议宽度。
UIComponent
 InheritedexplicitMinHeight : Number
布局过程中父级要考虑的组件最小建议高度。
UIComponent
 InheritedexplicitMinWidth : Number
布局过程中父级要考虑的组件最小建议宽度。
UIComponent
 InheritedexplicitWidth : Number
指定该组件在组件坐标中显式宽度(以像素为单位)的数字。
UIComponent
 Inheritedfilters : Array
包含当前与显示对象关联的每个滤镜对象的索引数组。
DisplayObject
 InheritedflexContextMenu : IFlexContextMenu
此 UIComponent 的上下文菜单。
UIComponent
 InheritedfocusEnabled : Boolean
指示切换到此组件时,是否可以接收焦点。
UIComponent
 InheritedfocusManager : IFocusManager
获取控制此组件及其同级组件的焦点的 FocusManager。
UIComponent
 InheritedfocusPane : Sprite
与此对象相关联的焦点窗格。
UIComponent
 InheritedfocusRect : Object
指定此对象是否显示焦点矩形。
InteractiveObject
 Inheritedgraphics : Graphics
[只读 (read-only)] 指定属于此 sprite 的 Graphics 对象,在此 sprite 中可执行矢量绘画命令。
Sprite
 Inheritedheight : Number
指定组件在父坐标中的高度的数字(以像素为单位)。
UIComponent
 InheritedhitArea : Sprite
指定一个 sprite 用作另一个 sprite 的点击区域。
Sprite
 Inheritedid : String
组件 ID。
UIComponent
  imeMode : String
指定 IME(输入法编辑器)模式。
ComboBase
 InheritedincludeInLayout : Boolean
指定此组件是否包含在父容器的布局中。
UIComponent
 InheritedinheritingStyles : Object
此组件的继承样式链的开头内容。
UIComponent
 Inheritedinitialized : Boolean
一个标志,用于确定某个对象是否已通过布局的所有三个阶段:提交、测量和布局(假设每个阶段都是必需的)。
UIComponent
 InheritedinstanceIndex : int
[只读 (read-only)] 重复组件的索引。
UIComponent
 InheritedinstanceIndices : Array
一个 Array,包含从此 UIComponent 对象的父文档引用该对象所需的索引。
UIComponent
 InheritedisDocument : Boolean
[只读 (read-only)] 确定此 UIComponent 实例是否为文档对象,也就是说它是否位于 Flex 应用程序、MXML 组件或 ActionScript 组件层次结构的顶层。
UIComponent
 InheritedisPopUp : Boolean
PopUpManager 将其设置为 true 以指示已弹出该组件。
UIComponent
 InheritedloaderInfo : LoaderInfo
[只读 (read-only)] 返回一个 LoaderInfo 对象,其中包含加载此显示对象所属的文件的相关信息。
DisplayObject
 Inheritedmask : DisplayObject
调用显示对象被指定的 mask 对象遮罩。
DisplayObject
 InheritedmaxHeight : Number
布局过程中父级要考虑的组件最大建议高度。
UIComponent
 InheritedmaxWidth : Number
布局过程中父级要考虑的组件最大建议宽度。
UIComponent
 InheritedmeasuredHeight : Number
组件的默认高度(以像素为单位)。
UIComponent
 InheritedmeasuredMinHeight : Number
组件的默认最小高度(以像素为单位)。
UIComponent
 InheritedmeasuredMinWidth : Number
组件的默认最小宽度(以像素为单位)。
UIComponent
 InheritedmeasuredWidth : Number
组件的默认宽度(以像素为单位)。
UIComponent
 InheritedminHeight : Number
布局过程中父级要考虑的组件最小建议高度。
UIComponent
 InheritedminWidth : Number
布局过程中父级要考虑的组件最小建议宽度。
UIComponent
 InheritedmoduleFactory : IFlexModuleFactory
用于在正确的 SWF 上下文中创建 TextFields 的 moduleFactory。
UIComponent
 InheritedmouseChildren : Boolean
确定对象的子项是否支持鼠标。
DisplayObjectContainer
 InheritedmouseEnabled : Boolean
指定此对象是否接收鼠标消息。
InteractiveObject
 InheritedmouseFocusEnabled : Boolean
单击时是否可接收焦点。
UIComponent
 InheritedmouseX : Number
[只读 (read-only)] 指示鼠标位置的 x 坐标,以像素为单位。
DisplayObject
 InheritedmouseY : Number
[只读 (read-only)] 指示鼠标位置的 y 坐标,以像素为单位。
DisplayObject
 Inheritedname : String
指示 DisplayObject 的实例名称。
DisplayObject
 InheritednestLevel : int
此对象在所属关系层次结构中的深度。
UIComponent
 InheritednonInheritingStyles : Object
此组件的非继承样式链的开头内容。
UIComponent
 InheritednumAutomationChildren : int
[只读 (read-only)] 此容器包含的自动化子项数。
UIComponent
 InheritednumChildren : int
[只读 (read-only)] 返回此对象的子项数目。
DisplayObjectContainer
 InheritedopaqueBackground : Object
指定显示对象是否由于具有某种背景颜色而不透明。
DisplayObject
 Inheritedowner : DisplayObjectContainer
此 UIComponent 的所有者。
UIComponent
 Inheritedparent : DisplayObjectContainer
[只读 (read-only)] 此组件的父容器或组件。
UIComponent
 InheritedparentApplication : Object
[只读 (read-only)] 引用包含此 UIComponent 实例的 Application 对象。
UIComponent
 InheritedparentDocument : Object
[只读 (read-only)] 引用此 UIComponent 的父文档对象。
UIComponent
 InheritedpercentHeight : Number
以组件父项大小百分比的方式指定组件高度的数字。
UIComponent
 InheritedpercentWidth : Number
以组件父项大小百分比形式指定其宽度的数字。
UIComponent
 InheritedprocessedDescriptors : Boolean
临时或延迟子项创建操作后设置为 true,具体取决于发生对象。
UIComponent
 Inheritedprototype : Object
[静态] 对类或函数对象的原型对象的引用。
Object
 Inheritedrepeater : IRepeater
[只读 (read-only)] 对生成此 UIComponent 的父文档中 Repeater 对象的引用。
UIComponent
 InheritedrepeaterIndex : int
[只读 (read-only)] 项目在生成此 UIComponent 的 Repeater 数据提供程序中的索引。
UIComponent
 InheritedrepeaterIndices : Array
一个 Array,包含项目在生成此 UIComponent 的父文档的 Repeater 数据提供程序中的索引。
UIComponent
 Inheritedrepeaters : Array
一个 Array,包含对生成此 UIComponent 的父文档中 Repeater 对象的引用。
UIComponent
  restrict : String
用户可以或无法输入到文本字段中的字符集。
ComboBase
 Inheritedroot : DisplayObject
[只读 (read-only)] 对于加载的 SWF 文件中的显示对象,root 属性是此 SWF 文件所表示的显示列表树结构部分中的顶级显示对象。
DisplayObject
 Inheritedrotation : Number
指示 DisplayObject 实例距其原始方向的旋转程度,以度为单位。
DisplayObject
 InheritedrotationX : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 x 轴旋转(以度为单位)。
DisplayObject
 InheritedrotationY : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 y 轴旋转(以度为单位)。
DisplayObject
 InheritedrotationZ : Number
指示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 z 轴旋转(以度为单位)。
DisplayObject
 Inheritedscale9Grid : Rectangle
当前有效的缩放网格。
DisplayObject
 InheritedscaleX : Number
用于指定水平缩放系数的数字。
UIComponent
 InheritedscaleY : Number
用于指定垂直缩放系数的数字。
UIComponent
 InheritedscaleZ : Number
指示从对象的注册点开始应用的对象的深度缩放比例(百分比)。
DisplayObject
 Inheritedscreen : Rectangle
[只读 (read-only)] 返回包含此对象的基本绘图表面大小和位置的对象。
UIComponent
 InheritedscrollRect : Rectangle
显示对象的滚动矩形范围。
DisplayObject
  selectedIndex : int
所选项目的数据提供程序中的索引。
ComboBase
  selectedItem : Object
位于 selectedIndex 处的数据提供程序中的项目。
ComboBase
 InheritedshowInAutomationHierarchy : Boolean
用于确定自动化对象是否显示在自动化层次中的标志。
UIComponent
 InheritedsoundTransform : SoundTransform
控制此 sprite 中的声音。
Sprite
 Inheritedstage : Stage
[只读 (read-only)] 显示对象的舞台。
DisplayObject
 Inheritedstates : Array
为此组件定义的视图状态。
UIComponent
 InheritedstyleDeclaration : CSSStyleDeclaration
存储此对象的内嵌继承样式。
UIComponent
 InheritedstyleName : Object
此组件使用的类样式。
UIComponent
 InheritedsystemManager : ISystemManager
返回此组件使用的 SystemManager 对象。
UIComponent
 InheritedtabChildren : Boolean
确定对象的子项是否支持 Tab 键。
DisplayObjectContainer
 InheritedtabEnabled : Boolean
指定此对象是否遵循 Tab 键顺序。
InteractiveObject
 InheritedtabIndex : int
指定 SWF 文件中的对象按 Tab 键顺序排列。
InteractiveObject
  text : String
文本字段的内容。
ComboBase
 InheritedtextSnapshot : TextSnapshot
[只读 (read-only)] 返回此 DisplayObjectContainer 实例的 TextSnapshot 对象。
DisplayObjectContainer
 InheritedtoolTip : String
要在 ToolTip 中显示的文本。
UIComponent
 Inheritedtransform : Transform
一个对象,具有与显示对象的矩阵、颜色转换和像素范围有关的属性。
DisplayObject
 Inheritedtransitions : Array
一个 Transition 对象 Array,其中的每个 Transition 对象都定义一组效果,用于在视图状态发生更改时播放。
UIComponent
 InheritedtweeningProperties : Array
当前在此对象上进行补间的属性数组。
UIComponent
 Inheriteduid : String
对象的唯一标识符。
UIComponent
 InheritedupdateCompletePendingFlag : Boolean
一个标志,确定某个对象是否已通过所有三个阶段的布局验证(假设需要通过所有验证)。
UIComponent
 InheriteduseHandCursor : Boolean
布尔值,指示当鼠标滑过其 buttonMode 属性设置为 true 的 sprite 时是否显示手指形(手形光标)。
Sprite
 InheritedvalidationSubField : String
供验证程序用来将子字段与此组件相关联。
UIComponent
  value : Object
[只读 (read-only)] 所选项目的值。
ComboBase
 Inheritedvisible : Boolean
控制此 UIComponent 的可见性。
UIComponent
 Inheritedwidth : Number
指定组件在父坐标中的宽度的数字(以像素为单位)。
UIComponent
 Inheritedx : Number
指定组件在其父容器中的水平位置(以像素为单位)的数字。
UIComponent
 Inheritedy : Number
指定组件在其父容器中的垂直位置(以像素为单位)的数字。
UIComponent
 Inheritedz : Number
指示 DisplayObject 实例相对于 3D 父容器沿 z 轴的 z 坐标位置。
DisplayObject
受保护的属性
 属性定义方
  arrowButtonStyleFilters : Object
[只读 (read-only)] 从 ComboBase 传递给向下箭头按钮的样式集
ComboBase
  borderMetrics : EdgeMetrics
[只读 (read-only)] 返回 EdgeMetrics 对象,它具有四个属性:left、top、right 和 bottom。
ComboBase
  collection : ICollectionView
此组件显示的项目的 ICollectionView。
ComboBase
  iterator : IViewCursor
主 IViewCursor,用于从 dataProvider 中获取项目并将项目传递给渲染器。
ComboBase
 InheritedresourceManager : IResourceManager
[只读 (read-only)] 引用管理所有应用程序本地化资源的对象。
UIComponent
  textInput : TextInput
显示当前所选内容的内部 TextInput 子组件。
ComboBase
  textInputStyleFilters : Object
[只读 (read-only)] 从 ComboBase 传递到文本输入的样式集。
ComboBase
 InheritedunscaledHeight : Number
[只读 (read-only)] 用于确定组件的未缩放高度的简便方法。
UIComponent
 InheritedunscaledWidth : Number
[只读 (read-only)] 用于确定组件的未缩放宽度的简便方法。组件的绘图和子布局的所有设置均应在以此宽度为宽的矩形边框中完成,还应将此宽度作为参数传递到 updateDisplayList() 中。
UIComponent
公共方法
 方法定义方
  
构造函数。
ComboBase
 Inherited
将一个 DisplayObject 子实例添加到该 DisplayObjectContainer 实例中。
DisplayObjectContainer
 Inherited
将一个 DisplayObject 子实例添加到该 DisplayObjectContainer 实例中。
DisplayObjectContainer
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。
EventDispatcher
 Inherited
指示安全限制是否会导致出现以下情况:在列表中忽略了使用指定 point 点调用 DisplayObjectContainer.getObjectsUnderPoint() 方法时返回的所有显示对象。
DisplayObjectContainer
 Inherited
callLater(method:Function, args:Array = null):void
排队稍后调用的函数。
UIComponent
 Inherited
删除此组件实例中的样式属性。
UIComponent
 Inherited
确定指定显示对象是 DisplayObjectContainer 实例的子项还是该实例本身。
DisplayObjectContainer
 Inherited
将 Point 对象由内容坐标转换为全局坐标。
UIComponent
 Inherited
将 Point 对象由内容坐标转换为本地坐标。
UIComponent
 Inherited
返回标识此容器中的子项的一组属性。
UIComponent
 Inherited
在 IUIComponent 对象的父项文档对象上创建对此对象的 id 引用。
UIComponent
 Inherited
在 IUIComponent 对象的父项文档对象上删除对此对象的 id 引用。
UIComponent
 Inherited
返回与此 UIComponent 的文本样式对应的 UITextFormat 对象。
UIComponent
 Inherited
将事件调度到事件流中。
UIComponent
 Inherited
在此组件周围显示或隐藏焦点指示符。
UIComponent
 Inherited
drawRoundRect(x:Number, y:Number, width:Number, height:Number, cornerRadius:Object = null, color:Object = null, alpha:Object = null, gradientMatrix:Matrix = null, gradientType:String = "linear", gradientRatios:Array = null, hole:Object = null):void
通过编程方式在此外观的 Graphics 对象中绘制一个矩形。
UIComponent
 Inherited
停止在组件上播放效果实例时,由效果实例调用。
UIComponent
 Inherited
开始在组件上播放效果实例时,由效果实例调用。
UIComponent
 Inherited
结束组件上当前播放的所有效果。
UIComponent
 Inherited
executeBindings(recurse:Boolean = false):void
将数据绑定到此 UIComponent 对象。
UIComponent
 Inherited
打印完成后调用。
UIComponent
 Inherited
在指定的索引位置提供自动化对象。
UIComponent
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
返回一个矩形,该矩形定义相对于 targetCoordinateSpace 对象坐标系的显示对象区域。
DisplayObject
 Inherited
返回位于指定索引处的子显示对象实例。
DisplayObjectContainer
 Inherited
返回具有指定名称的子显示对象。
DisplayObjectContainer
 Inherited
返回 DisplayObject 的 child 实例的索引位置。
DisplayObjectContainer
 Inherited
查找此 UIComponent 实例的类型选择器。
UIComponent
 Inherited
getConstraintValue(constraintName:String):*
返回一个约束布局值,这与获取此组件的约束样式的方式类似。
UIComponent
 Inherited
确定是使用显式高度还是测量高度的一种简便方法
UIComponent
 Inherited
确定是使用显式宽度还是测量宽度的一种简便方法
UIComponent
 Inherited
获取当前具有焦点的对象。
UIComponent
 Inherited
返回对象的数组,这些对象位于指定点下,并且是该 DisplayObjectContainer 实例的子项(或孙子项,依此类推)。
DisplayObjectContainer
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
返回一个矩形,该矩形根据 targetCoordinateSpace 参数定义的坐标系定义显示对象的边界,但不包括形状上的任何笔触。
DisplayObject
 Inherited
getRepeaterItem(whichRepeater:int = -1):Object
返回 dataProvider 中由指定的 Repeater 用来生成此 Repeater 的项目;如果此 Repeater 未重复,则返回 null。
UIComponent
 Inherited
getStyle(styleProp:String):*
获取已在此组件的样式查找链中的某个位置设置过的样式属性。
UIComponent
 Inherited
将 Point 对象由全局坐标转换为内容坐标。
UIComponent
 Inherited
将 point 对象从舞台(全局)坐标转换为显示对象的(本地)坐标。
DisplayObject
 Inherited
将二维点从舞台(全局)坐标转换为三维显示对象的(本地)坐标。
DisplayObject
 Inherited
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
EventDispatcher
 Inherited
指示对象是否已经定义了指定的属性。
Object
 Inherited
计算显示对象,以确定它是否与 obj 显示对象重叠或相交。
DisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
计算显示对象,以确定它是否与 x 和 y 参数指定的点重叠或相交。
DisplayObject
 Inherited
返回一个框 Matrix,在绘制水平渐变时可以将其作为 rot 参数传递给 drawRoundRect() 方法。
UIComponent
 Inherited
初始化此组件的内部结构。
UIComponent
 Inherited
初始化用于跟踪此组件的重复实例的各个属性。
UIComponent
 Inherited
标记组件,以便在稍后屏幕更新期间调用该组件的 updateDisplayList() 方法。
UIComponent
 Inherited
标记组件,以便在稍后屏幕更新期间调用该组件的 commitProperties() 方法。
UIComponent
 Inherited
标记组件,以便在稍后屏幕更新期间调用该组件的 measure() 方法。
UIComponent
 Inherited
指示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
将三维显示对象的(本地)坐标的三维点转换为舞台(全局)坐标中的二维点。
DisplayObject
 Inherited
将 Point 对象由本地坐标转换为内容坐标。
UIComponent
 Inherited
将 point 对象从显示对象的(本地)坐标转换为舞台(全局)坐标。
DisplayObject
 Inherited
测量指定的 HTML 文本(该文本中可能包含 <font> 和 <b> 等 HTML 标记),假定该文本显示在单行 UITextField(使用由此 UIComponent 的样式确定的 UITextFormat)中。
UIComponent
 Inherited
测量指定的文本,假定该文本显示在单行 UITextField(使用由此 UIComponent 的样式确定的 UITextFormat)中。
UIComponent
 Inherited
将组件移动到其父项内的指定位置。
UIComponent
 Inherited
将样式更改传播到子项。
UIComponent
 Inherited
如果 owner 属性链从 child 指向此 UIComponent,则返回 true。
UIComponent
 Inherited
当在父项中添加或删除 UIComponent 对象时由 Flex 调用。
UIComponent
 Inherited
准备 IFlexDisplayObject 用于打印。
UIComponent
 Inherited
指示指定的属性是否存在、是否可枚举。
Object
 Inherited
为此组件构建或重新构建 CSS 样式缓存;如果 recursive 参数为 true,还会为此组件的所有后代执行同样的操作。
UIComponent
 Inherited
针对每个效果事件,将 EffectManager 注册为一个事件侦听器。
UIComponent
 Inherited
从 DisplayObjectContainer 实例的子列表中删除指定的 child DisplayObject 实例。
DisplayObjectContainer
 Inherited
从 DisplayObjectContainer 的子列表中指定的 index 位置删除子 DisplayObject。
DisplayObjectContainer
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
从 EventDispatcher 对象中删除侦听器。
EventDispatcher
 Inherited
重放指定的事件。
UIComponent
 Inherited
使用提供的 ID 解析子项。
UIComponent
 Inherited
[静态] 在调用 suspendBackgroundProcessing() 之后继续对使用 callLater() 排队的方法进行背景处理。
UIComponent
 Inherited
调整对象大小。
UIComponent
 Inherited
更改现有子项在显示对象容器中的位置。
DisplayObjectContainer
 Inherited
setConstraintValue(constraintName:String, value:*):void
设置一个布局约束值的方式,与设置此组件的约束样式的方式相同。
UIComponent
 Inherited
setCurrentState(stateName:String, playTransition:Boolean = true):void
设置当前状态。
UIComponent
 Inherited
设置此组件的焦点。
UIComponent
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
setStyle(styleProp:String, newValue:*):void
对此组件实例设置样式属性。
UIComponent
 Inherited
setVisible(value:Boolean, noEvent:Boolean = false):void
当 visible 属性发生更改时调用。
UIComponent
 Inherited
startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void
允许用户拖动指定的 Sprite。
Sprite
 Inherited
结束 startDrag() 方法。
Sprite
 Inherited
检测对样式属性的更改。
UIComponent
 Inherited
首次初始化组件样式时,Flex 会调用 stylesInitialized() 方法。
UIComponent
 Inherited
[静态] 阻止对使用 callLater() 排队的方法进行背景处理,直到调用 resumeBackgroundProcessing() 为止。
UIComponent
 Inherited
交换两个指定子对象的 Z 轴顺序(从前到后顺序)。
DisplayObjectContainer
 Inherited
swapChildrenAt(index1:int, index2:int):void
在子级列表中两个指定的索引位置,交换子对象的 Z 轴顺序(前后顺序)。
DisplayObjectContainer
 Inherited
返回一个字符串,用于指示此对象在应用程序的 DisplayObject 层次结构中所处的位置。
FlexSprite
 Inherited
验证子项的位置和大小,并绘制其它可视内容。
UIComponent
 Inherited
验证并更新此对象的属性和布局,如果需要的话重绘对象。
UIComponent
 Inherited
由布局逻辑用于通过调用 commitProperties() 方法来验证组件的属性。
UIComponent
 Inherited
validateSize(recursive:Boolean = false):void
如果使用此 ILayoutManagerClient 调用 LayoutManager.invalidateSize() 方法,随后在测量时调用了 validateSize() 方法,则验证组件的度量大小。
UIComponent
 Inherited
处理分配给此组件的验证程序调度的 valid 和 invalid 事件。
UIComponent
 Inherited
返回指定对象的原始值。
Object
 Inherited
返回一个框 Matrix,在绘制垂直渐变时可以将其作为 rot 参数传递给 drawRoundRect()。
UIComponent
 Inherited
检查是否用此 EventDispatcher 对象或其任何始祖为指定事件类型注册了事件侦听器。
EventDispatcher
受保护的方法
 方法定义方
 Inherited
调整焦点矩形。
UIComponent
 Inherited
这是一个内部方法,供 Flex 框架用于支持 Dissolve 效果。
UIComponent
  
确定下拉列表中条目的高度和宽度使用的默认值。
ComboBase
 Inherited
创建子对象后执行任何最终处理。
UIComponent
  
对数据提供程序更改做出响应。
ComboBase
 Inherited
处理对组件设置的属性。
UIComponent
 Inherited
‏‏创建组件的子对象。
UIComponent
 Inherited
根据所用的嵌入字体使用上下文创建新对象。
UIComponent
 Inherited
使用给定的 moduleFactory 创建对象。
UIComponent
  
按下下拉按钮时,执行某些操作。
ComboBase
 Inherited
当 UIComponent 对象获得焦点时调用的事件处理函数。
UIComponent
 Inherited
当 UIComponent 对象失去焦点时调用的事件处理函数。
UIComponent
 Inherited
完成对此组件的初始化。
UIComponent
 Inherited
初始化此组件的辅助功能代码。
UIComponent
 Inherited
通常由包含 UITextField 对象的组件覆盖,其中 UITextField 对象获取焦点。
UIComponent
  
确定 dataProvider 项目的 UID。
ComboBase
 Inherited
为 keyDown 事件调用的事件处理函数。
UIComponent
 Inherited
为 keyUp 事件调用的事件处理函数。
UIComponent
  
确定控件的 measuredWidth 和 measuredHeight 属性。
ComboBase
 Inherited
构建 UIComponent 时将调用此方法,并且每当 ResourceManager 调度“change”事件用于指示本地化资源已经过某种更改时,都会再次调用此方法。
UIComponent
  
处理对 TextInput 的更改,它用作组件中可编辑的文本字段。
ComboBase
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
根据给定宽度和高度确定内部组件的大小和位置。
ComboBase
事件
 事件 摘要 定义方
 Inherited[广播事件] Flash Player 或 AIR 应用程序获得操作系统焦点并变为活动状态时将调度此事件。EventDispatcher
 Inherited使用 addChild() 或 addChildAt() 方法将组件作为内容子项添加到容器时调度。UIComponent
 Inherited将显示对象添加到显示列表中时调度。DisplayObject
 Inherited在将显示对象直接添加到舞台显示列表或将包含显示对象的子树添加至舞台显示列表中时调度。DisplayObject
 Inherited当用户从文本上下文菜单中选择“清除”(或“删除”)时调度。InteractiveObject
 Inherited用户在同一 InteractiveObject 上按下并释放用户指针设备的主按钮时调度。InteractiveObject
 Inherited当用户在 AIR 应用程序中选择与此交互式对象相关联的上下文菜单时调度。InteractiveObject
 Inherited当用户激活特定于平台的复制操作的快捷键组合或从文本上下文菜单中选择“复制”时调度。InteractiveObject
 Inherited当组件完成其构建、属性处理、测量、布置和绘制时调度。UIComponent
 Inherited视图状态更改后调度。UIComponent
 Inherited在 currentState 属性更改后但视图状态更改前调度。UIComponent
 Inherited当用户激活特定于平台的剪切操作的快捷键组合或从文本上下文菜单中选择“剪切”时调度。InteractiveObject
 Inherited[广播事件] Flash Player 或 AIR 应用程序失去操作系统焦点并变为非活动状态时将调度此事件。EventDispatcher
 Inherited如果 InteractiveObject 的 doubleClickEnabled 标志设置为 true,当用户在该对象上快速连续按下两次并释放指针设备的主按钮时调度。InteractiveObject
 Inherited在拖动操作完成时(将拖动的数据放到放置目标时或在没有执行放置操作的情况下结束拖放操作时)由拖动启动器(作为要拖动的数据源的组件)调度。UIComponent
 Inherited用户在放置目标上释放鼠标时由放置目标调度。UIComponent
 Inherited当用户在拖动操作过程中将鼠标移动到某个组件所处的位置时,由该组件调度。UIComponent
 Inherited用户在组件外拖动但没有将数据放置到目标时,由组件调度。UIComponent
 Inherited在拖动操作期间,当用户在鼠标位于组件上方的情况下移动鼠标时,由组件调度。UIComponent
 Inherited启动拖动操作时,由拖动启动器调度。UIComponent
 Inherited在一个效果结束后调度。UIComponent
 Inherited在即将开始播放效果前调度。UIComponent
 Inherited[播放事件] 播放头进入新帧时调度。DisplayObject
 Inherited组件返回到根视图状态之后调度。UIComponent
 Inherited[广播事件] 播放头退出当前帧时调度。DisplayObject
 Inherited组件退出根视图状态之前调度。UIComponent
 Inherited显示对象获得焦点后调度。InteractiveObject
 Inherited显示对象失去焦点后调度。InteractiveObject
 Inherited[广播事件] 在帧显示对象的构造函数运行之后但在帧脚本运行之前调度。DisplayObject
 Inherited当对象的状态从可见变为不可见时调度。UIComponent
 Inherited当组件完成构建并设置了所有初始化属性后调度。UIComponent
 Inherited当组件由 Validator 监控且未通过验证时调度。UIComponent
 Inherited用户按下某个键时调度。InteractiveObject
 Inherited用户尝试使用键盘导航更改焦点时调度。InteractiveObject
 Inherited用户释放某个键时调度。InteractiveObject
 Inherited当用户在同一 InteractiveObject 上按下并释放用户指针设备的中间按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备的中间按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备按钮时调度。InteractiveObject
 Inherited当用户在使用 PopUpManager 打开的某个组件外部单击时,从该组件调度。UIComponent
 Inherited用户尝试使用指针设备更改焦点时调度。InteractiveObject
 Inherited用户移动 InteractiveObject 上的指针设备时调度。InteractiveObject
 Inherited用户将指针设备从 InteractiveObject 实例上移开时调度。InteractiveObject
 Inherited用户将指针设备移动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited当鼠标滚轮滚动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited当用户使用鼠标滚轮滚动到使用 PopUpManager 打开的某个组件外部时,从该组件调度。UIComponent
 Inherited移动对象后调度。UIComponent
 Inherited当用户释放拖动动作时由拖动启动器 InteractiveObject 调度。InteractiveObject
 Inherited在将拖动对象放置到目标上且已通过对 DragManager.acceptDragDrop() 的调用接受该放置操作时,由目标 InteractiveObject 调度。InteractiveObject
 Inherited当拖动动作进入其边界时由 InteractiveObject 调度。InteractiveObject
 Inherited当拖动动作离开其边界时由 InteractiveObject 调度。InteractiveObject
 Inherited当拖动动作保持在其边界内时,由 InteractiveObject 持续调度。InteractiveObject
 Inherited在拖动操作开始时由在 DragManager.doDrag() 调用中指定为拖动启动器的 InteractiveObject 调度。InteractiveObject
 Inherited在拖动操作期间由在 DragManager.doDrag() 调用中指定为拖动启动器的 InteractiveObject 调度。InteractiveObject
 Inherited当用户激活特定于平台的粘贴操作的快捷键组合或从文本上下文菜单中选择“粘贴”时调度。InteractiveObject
 Inherited在组件初始化序列开始时调度。UIComponent
 Inherited使用 removeChild() 或 removeChildAt() 方法将组件作为内容子项从容器中删除时调度。UIComponent
 Inherited将要从显示列表中删除显示对象时调度。DisplayObject
 Inherited在从显示列表中直接删除显示对象或删除包含显示对象的子树时调度。DisplayObject
 Inherited[广播事件] 将要更新和呈现显示列表时调度。DisplayObject
 Inherited在调整组件大小时调度。UIComponent
 Inherited当用户在同一 InteractiveObject 上按下并释放用户指针设备的右按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited用户将指针设备从 InteractiveObject 实例上移开时调度。InteractiveObject
 Inherited用户将指针设备移动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited当用户激活特定于平台的全选操作的快捷键组合或从文本上下文菜单中选择“全选”时调度。InteractiveObject
 Inherited当对象的状态从不可见变为可见时调度。UIComponent
 Inherited对象的 tabChildren 标志值发生更改时调度。InteractiveObject
 Inherited对象的 tabEnabled 标志发生更改时调度。InteractiveObject
 Inherited对象的 tabIndex 属性值发生更改时调度。InteractiveObject
 Inherited要创建 ToolTip 时由组件调度。UIComponent
 Inherited已隐藏组件的 ToolTip 并要将其放弃时由组件调度。UIComponent
 Inherited要隐藏组件的 ToolTip 时由组件调度。UIComponent
 Inherited要显示组件的 ToolTip 时由组件调度。UIComponent
 Inherited显示组件的 ToolTip 时由组件调度。UIComponent
 Inherited用户将鼠标移动到设置了 toolTip 属性的组件上方后,由该组件调度。UIComponent
 Inherited当调用了对象的 commitProperties()、measure() 和 updateDisplayList() 方法后调度(如果需要)。UIComponent
 Inherited当组件由 Validator 监控并且成功通过验证时调度。UIComponent
 Inherited当以编程方式或通过用户交互更改值时调度。UIComponent
样式
 样式 说明 定义方
 Inherited类型: String CSS 继承: no
从内容区域的上边缘到控件的基线位置的垂直距离(以像素为单位)。如果设置此样式,则组件的基线锚定在其内容区域的上边缘;调整组件容器大小后,这两个边缘将保持它们的间距。

此样式仅在 Canvas 容器中的组件上,或在 Panel 或 Application 容器(layout 属性设置为 absolute)中的组件上使用时才发挥作用。

默认值为 undefined,即不进行设置。

.
UIComponent
 Inherited类型: String CSS 继承: no
从组件的下边缘到其内容区域的下边缘的垂直距离(以像素为单位)。如果设置此样式,则组件的下边缘锚定在其内容区域的下边缘;调整组件容器大小后,这两个边缘将保持它们的间距。

此样式仅在 Canvas 容器中的组件上,或在 Panel 或 Application 容器(layout 属性设置为 absolute)中的组件上使用时才发挥作用。

默认值为 undefined,即不进行设置。

.
UIComponent
  
disabledSkin
类型: Class CSS 继承: no
禁用控件时用作背景和边框外观的类的名称。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。对于 ColorPicker 类,默认值为 ColorPickerSkin 类。对于 DateField 类,默认值为 ScrollArrowDownSkin 类。
ComboBase
  
downSkin
类型: Class CSS 继承: no
当用户按住鼠标按键时,用作背景和边框外观的类的名称。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。对于 ColorPicker 类,默认值为 ColorPickerSkin 类。对于 DateField 类,默认值为 ScrollArrowDownSkin 类。
ComboBase
  
editableDisabledSkin
类型: Class CSS 继承: no
当禁用控件且 editable 属性为 true 时,用作背景和边框外观的类的名称。此外观只适用于 ComboBox 类。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。
ComboBase
  
editableDownSkin
类型: Class CSS 继承: no
当用户按住鼠标按钮且 editable 属性为 true 时,用作背景和边框外观的类的名称。此外观只适用于 ComboBox 类。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。
ComboBase
  
editableOverSkin
类型: Class CSS 继承: no
当鼠标位于控件上方且 editable 属性为 true 时,用作背景和边框外观的类的名称。此外观只适用于 ComboBox 类。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。
ComboBase
  
editableUpSkin
类型: Class CSS 继承: no
当鼠标未置于控件上方且 editable 属性为 true 时,用作背景和边框外观的类的名称。此外观只适用于 ComboBox 类。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。
ComboBase
 Inherited类型: uint 格式: Color CSS 继承: yes
验证失败时,组件加亮部分的颜色。验证失败时,Flex 还会将组件的 borderColor 样式设置为 errorColor。.
UIComponent
 Inherited类型: String CSS 继承: no
焦点矩形使用的混合模式。有关详细信息,请参阅 flash.
UIComponent
 Inherited类型: Class CSS 继承: no
用于绘制焦点矩形的外观。.
UIComponent
 Inherited类型: Number 格式: Length CSS 继承: no
焦点矩形轮廓的粗细,以像素为单位。.
UIComponent
 Inherited类型: String CSS 继承: no
从组件内容区域的中心到组件中心的水平距离(以像素为单位)。如果设置此样式,则组件的中心锚定在其内容区域的中心;调整组件容器大小后,这两个中心将保持它们的水平间距。

此样式仅在 Canvas 容器中的组件上,或在 Panel 或 Application 容器(layout 属性设置为 absolute)中的组件上使用时才发挥作用。

默认值为 undefined,即不进行设置。

.
UIComponent
 Inherited类型: String CSS 继承: no
从组件内容区域的左边缘到组件左边缘的水平距离(以像素为单位)。如果设置此样式,则组件的左边缘锚定在其内容区域的左边缘;调整组件容器大小后,这两个边缘将保持它们的间距。

此样式仅在 Canvas 容器中的组件上,或在 Panel 或 Application 容器(layout 属性设置为 absolute)中的组件上使用时才发挥作用。

默认值为 undefined,即不进行设置。

.
UIComponent
  
overSkin
类型: Class CSS 继承: no
当鼠标位于控件上方时,用作背景和边框外观的类的名称。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。对于 ColorPicker 类,默认值为 ColorPickerSkin 类。对于 DateField 类,默认值为 ScrollArrowDownSkin 类。
ComboBase
 Inherited类型: String CSS 继承: no
从组件的右边缘到其内容区域的右边缘的水平距离(以像素为单位)。如果设置此样式,则组件的右边缘锚定在其内容区域的右边缘;调整组件容器大小后,这两个边缘将保持它们的间距。

此样式仅在 Canvas 容器中的组件上,或在 Panel 或 Application 容器(layout 属性设置为 absolute)中的组件上使用时才发挥作用。

默认值为 undefined,即不进行设置。

.
UIComponent
  
skin
类型: Class CSS 继承: no
用作背景和边框默认外观的类的名称。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。

您可以使用外观样式来为以下外观状态指定外观: up, over, down, disabled, editableUp, editableOver, editableDown, editableDisabled.
ComboBase
  
textInputStyleName
类型: String CSS 继承: no
显示当前所选内容的内部 TextInput 子组件的样式声明。如果未指定任何值,则 TextInput 子组件将使用由 ComboBase 类定义的默认文本样式。 默认值为 "".
ComboBase
 Inherited类型: uint 格式: Color CSS 继承: yes
组件的主题颜色。此属性控制加亮内容的外观、选中组件时的外观和其它相似的形象化提示,但是它对此组件的常规边框和背景颜色不起作用。虽然可以使用任意有效的颜色值,但首选值为 haloGreenhaloBluehaloOrangehaloSilver

rollOverColorselectionColor 样式的默认值基于 themeColor 值。

.
UIComponent
 Inherited类型: String CSS 继承: no
从控件内容区域的上边缘到组件上边缘的垂直距离(以像素为单位)。如果设置此样式,则组件的上边缘锚定在其内容区域的上边缘;调整其容器大小后,这两个边缘将保持其间距。

此样式仅在 Canvas 容器中的组件上,或在 Panel 或 Application 容器(layout 属性设置为 absolute)中的组件上使用时才发挥作用。

默认值为 undefined,即不进行设置。

.
UIComponent
  
upSkin
类型: Class CSS 继承: no
当鼠标未置于控件上方时,用作背景和边框外观的类的名称。对于 ComboBase 类,没有默认值。对于 ComboBox 类,默认值为 ComboBoxArrowSkin 类。
ComboBase
 Inherited类型: String CSS 继承: no
从组件内容区域的中心到组件中心的垂直距离(以像素为单位)。如果设置此样式,则组件的中心锚定在其内容区域的中心;调整其容器大小后,这两个中心将保持其垂直间距。

此样式仅在 Canvas 容器中的组件上,或在 Panel 或 Application 容器(layout 属性设置为 absolute)中的组件上使用时才发挥作用。

默认值为 undefined,即不进行设置。

.
UIComponent
效果
 效果 说明 定义方
 Inherited 触发事件: added
将组件作为子项添加到 Container 时播放。
UIComponent
 Inherited 触发事件: creationComplete
创建组件时播放。
UIComponent
 Inherited 触发事件: focusIn
组件获得键盘焦点时播放。
UIComponent
 Inherited 触发事件: focusOut
组件失去键盘焦点时播放。
UIComponent
 Inherited 触发事件: hide
组件变为不可见时播放。
UIComponent
 Inherited 触发事件: mouseDown
用户在组件上方按下鼠标按键时播放。
UIComponent
 Inherited 触发事件: mouseUp
用户在组件上方释放鼠标按键时播放。
UIComponent
 Inherited 触发事件: move
移动组件时播放。
UIComponent
 Inherited 触发事件: removed
从 Container 中删除组件时播放。
UIComponent
 Inherited 触发事件: resize
调整组件大小时播放。
UIComponent
 Inherited 触发事件: rollOut
用户将鼠标指针滚离组件上方时播放。
UIComponent
 Inherited 触发事件: rollOver
用户将鼠标指针滚动到组件上方时播放。
UIComponent
 Inherited 触发事件: show
组件变为可见时播放。
UIComponent
公共常量
 常量定义方
 InheritedDEFAULT_MAX_HEIGHT : Number = 10000
[静态] maxHeight 属性的默认值。
UIComponent
 InheritedDEFAULT_MAX_WIDTH : Number = 10000
[静态] maxWidth 属性的默认值。
UIComponent
 InheritedDEFAULT_MEASURED_HEIGHT : Number = 22
[静态] measuredHeight 属性的默认值。
UIComponent
 InheritedDEFAULT_MEASURED_MIN_HEIGHT : Number = 22
[静态] measuredMinHeight 属性的默认值。
UIComponent
 InheritedDEFAULT_MEASURED_MIN_WIDTH : Number = 40
[静态] measuredMinWidth 属性的默认值。
UIComponent
 InheritedDEFAULT_MEASURED_WIDTH : Number = 160
[静态] measuredWidth 属性的默认值。
UIComponent
属性详细信息
arrowButtonStyleFilters属性
arrowButtonStyleFilters:Object  [只读 (read-only)]

从 ComboBase 传递给向下箭头按钮的样式集



实现
    protected function get arrowButtonStyleFilters():Object

另请参见

borderMetrics属性 
borderMetrics:EdgeMetrics  [只读 (read-only)]

返回 EdgeMetrics 对象,它具有四个属性:lefttoprightbottom。每个属性的值等于相应边框的粗细(以像素为单位)。



实现
    protected function get borderMetrics():EdgeMetrics
collection属性 
protected var collection:ICollectionView

此组件显示的项目的 ICollectionView。

dataProvider属性 
dataProvider:Object  [读写]

此组件显示的一组项目。此属性是 Object 类型,因为派生的类可处理各种数据类型,如 Array、XML 及其它类。所有类型都将转换为 ICollectionView,并在获取此属性的值时返回该 ICollectionView;如果设置的值不是 ICollectionView,则不能获得该值。

如果尚未另外设置 selectedIndex 属性,设置此属性将调整 selectedIndex 属性(从而调整 selectedItem 属性)。如果不存在 prompt 属性,selectedIndex 属性将设置为 0;否则,后一属性将保留为 -1,即用于提示字符串的索引。如果已设置 selectedIndex 属性,并且设置的值超出了新数据提供程序的范围,很可能会发生意外行为。

此属性可用作数据绑定的源。修改此属性后,将调度 collectionChange 事件。



实现
    public function get dataProvider():Object
    public function set dataProvider(value:Object):void
editable属性 
editable:Boolean  [读写]

一个标志,指示控件可编辑还是不可编辑,可编辑时允许用户直接键入未在 dataProvider 中指定的条目,不可编辑时要求用户从 dataProvider 中的项目中进行选择。

如果值为 true,键盘输入将输入到可编辑的文本字段中,否则它将用作快捷键,用于选择 dataProvider 中的项目。

默认值为 false. This property is ignored by the DateField control..

此属性可用作数据绑定的源。修改此属性后,将调度 editableChanged 事件。



实现
    public function get editable():Boolean
    public function set editable(value:Boolean):void
imeMode属性 
imeMode:String  [读写]

指定 IME(输入法编辑器)模式。IME 使用户能够用中文、日文和韩文输入文本。当控件获得焦点时,Flex 设置指定的 IME 模式;当该控件失去焦点时,则将其设置回为先前的值。

flash.system.IMEConversionMode 类定义此属性的有效值的常量。您还可以指定 null 不指定任何 IME 模式。

默认值为 null.



实现
    public function get imeMode():String
    public function set imeMode(value:String):void
iterator属性 
protected var iterator:IViewCursor

主 IViewCursor,用于从 dataProvider 中获取项目并将项目传递给渲染器。在任何代码序列的末尾,都必须始终将其放置在屏幕上最上方的可见项目处。

restrict属性 
restrict:String  [读写]

用户可以或无法输入到文本字段中的字符集。

默认值为 null.

此属性可用作数据绑定的源。修改此属性后,将调度 restrictChanged 事件。



实现
    public function get restrict():String
    public function set restrict(value:String):void

另请参见

selectedIndex属性 
selectedIndex:int  [读写]

所选项目的数据提供程序中的索引。如果存在 prompt 属性,则可将 selectedIndex 值设为 -1 以显示提示。如果不存在 prompt 属性,则一旦设置了 dataProvider,就会将 selectedIndex 设置为 0。

如果 ComboBox 控件是可编辑的,则当用户在文本字段中键入任何文本时,selectedIndex 属性的值为 -1。

与其它许多失效的 Flex 属性(设置它们不会立即产生效果)不同,selectedIndexselectedItem 属性是同步的;设置其中一个属性会立即影响另一个属性。

默认值为 -1.

此属性可用作数据绑定的源。修改此属性后,将调度 valueCommit 事件。



实现
    public function get selectedIndex():int
    public function set selectedIndex(value:int):void
selectedItem属性 
selectedItem:Object  [读写]

位于 selectedIndex 处的数据提供程序中的项目。

如果数据为对象或类实例,则修改对象或实例中的属性会修改 dataProvider 对象,但可能不会更新视图,不过下列情况除外:实例是 Bindable 或者实例实现了 IPropertyChangeNotifier 或发生了对 dataProvider.itemUpdated() 的调用。

如果数据提供程序中存在该项目,则设置 selectedItem 属性将导致 ComboBox 控件选择该项目(将其显示在文本字段中并设置 selectedIndex)。如果 ComboBox 控件是可编辑的,则当用户在文本字段中键入任何文本时,selectedItem 属性的值为 null

与其它许多失效的 Flex 属性(设置它们不会立即产生效果)不同,selectedIndexselectedItem 属性是同步的;设置其中一个属性会立即影响另一个属性。

默认值为 null;.

此属性可用作数据绑定的源。修改此属性后,将调度 valueCommit 事件。



实现
    public function get selectedItem():Object
    public function set selectedItem(value:Object):void
text属性 
text:String  [读写]

文本字段的内容。如果控件是不可编辑的,则设置此属性不会产生任何效果。如果控件是可编辑的,则设置此属性会设置文本字段的内容。

默认值为 "".

此属性可用作数据绑定的源。修改此属性后,将调度 valueCommit 事件。



实现
    public function get text():String
    public function set text(value:String):void
textInput属性 
protected var textInput:TextInput

显示当前所选内容的内部 TextInput 子组件。

textInputStyleFilters属性 
textInputStyleFilters:Object  [只读 (read-only)]

从 ComboBase 传递到文本输入的样式集。如果设置了 textInputStyleName 样式属性,则将忽略这些样式。



实现
    protected function get textInputStyleFilters():Object

另请参见

value属性 
value:Object  [只读 (read-only)]

所选项目的值。如果项目是 Number 型的或 String 型的,则值为项目。如果项目为一个对象,则值为 data 属性(如果存在),或者为 label 属性(如果存在)。

注意:使用 selectedItem 属性通常比使用此属性更可取。value 属性用于实现与较早的应用程序的向后兼容。.

此属性可用作数据绑定的源。修改此属性后,将调度 valueCommit 事件。



实现
    public function get value():Object
构造函数详细信息
ComboBase()构造函数
public function ComboBase()

构造函数。

方法详细信息
calculatePreferredSizeFromData()方法
protected function calculatePreferredSizeFromData(numItems:int):Object

确定下拉列表中条目的高度和宽度使用的默认值。ComboBase 的每个子类必须实现此方法并返回包含 widthheight 这两个属性的 Object。

参数

numItems:int — 确定大小要检查的项目数.

返回
Object — 具有 widthheight 属性的 Object.
collectionChangeHandler()方法 
protected function collectionChangeHandler(event:Event):void

对数据提供程序更改做出响应。如果在组件的选定项目之前添加或删除项目,该组件将调整 selectedIndex 属性。

参数

event:Event — 从集合调度的 CollectionEvent.

另请参见

downArrowButton_buttonDownHandler()方法 
protected function downArrowButton_buttonDownHandler(event:FlexEvent):void

按下下拉按钮时,执行某些操作。这是一个抽象基类实现,因此它没有任何效果且将被子类覆盖。

参数

event:FlexEvent — 按下下拉按钮时所触发的事件。

itemToUID()方法 
protected function itemToUID(data:Object):String

确定 dataProvider 项目的 UID。每个 dataProvider 项目必须有一个唯一标识符 (UID) 或指定一个这样的标识符。

参数

data:Object — dataProvider 项目.

返回
String — 唯一标识符。
measure()方法 
override protected function measure():void

确定控件的 measuredWidthmeasuredHeight 属性。测量宽度是 dataProvider 中最宽文本的宽度与下拉按钮的宽度之和。测量高度是按钮或文本高度中的较大者。如果尚未设置数据提供程序或数据提供程序中没有任何项目,则 measuredWidth 属性将设置为 UIComponent.DEFAULT_MEASURED_WIDTHmeasuredHeight 属性将设置为 UIComponent.DEFAULT_MEASURED_HEIGHT

另请参见

textInput_changeHandler()方法 
protected function textInput_changeHandler(event:Event):void

处理对 TextInput 的更改,它用作组件中可编辑的文本字段。此方法将 selectedIndex 设置为 -1(从而将 selectedItem 设置为 null)。

参数

event:Event — 每次控件中文本发生更改时所触发的事件。

updateDisplayList()方法 
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

根据给定宽度和高度确定内部组件的大小和位置。下拉按钮始终放置在右侧,文本字段填充剩余区域。

参数

unscaledWidth:Number — 指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 scaleX 属性值。
 
unscaledHeight: