Flex 4.0 控件<ListBase类—SkinnableDataContainer>

来源:互联网 发布:上海美猴网络面试流程 编辑:程序博客网 时间:2024/05/21 17:31

mx.collections.IList(dataProvider):<length:int><addItem(item:Object):void><addItemAt(item:Object,index:int):void><removeItemAt(index:int):void><setItemAt(index:int):void><toArray():Array>

SkinnableDataContainer——SkinnableContainerBase——SkinnableComponent:将数据项目转换为可视元素以进行显示。<dataProvider:IList>

ListBase——SkinnableDataContainer:支持选择内容所有组件的基类。<labelField:String>——dataProvider中作为标签显示的名称。<selectedIndex:int><selectedItem:*>

主要事件:<change:spark.events.IndexChangeEvent>所选内容更改后分派。

                   <changing:spark.events.IndexChangeEvent>所选内容即将更改时分派。(未改动的话则不分派)

DropDownListBase——List——ListBase

ComboBox——DropDownListBase:下拉列表。(提示区域为TextInput)。<labelToItemFunction:Function>——在提示去输入的新值与dataProvider中数据的类型一致。<maxChars:int><openOnInput:Boolean>如果为true。则编辑提示区域会打开下拉列表。

           private function myLabelToItemFunction(input:String):*
            {
                <!-- Returns object that matches items in dataProvider -->
                return {ingredient:input, category:"mystery"};
            }       

DropDownList——DropDownListBase:下拉列表。(提示区域为Label)。<prompt:String>控件最初默认提示。

ButtonBar——ButtonBarBase——ListBase:一组相关按钮。提供共同外观和导航。(包含按钮为ButtonBarButton组件)

TabBar——ButtonBarBase——ListBase:一组相同选项卡。一次可选一个。默认情况下选择第一个。(每个选项卡定义为一个ButtonBarButton组件)



原创粉丝点击