`
thunderbow
  • 浏览: 155955 次
  • 性别: Icon_minigender_1
  • 来自: beijing
社区版块
存档分类
最新评论

Displaying icons in a Flex ComboBox control

阅读更多
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/08/18/displaying-icons-in-a-flex-combobox-control/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">

    <mx:Script>
        <![CDATA[
            import mx.events.FlexEvent;

            [Bindable]
            [Embed(source="assets/bulletCheck.png")]
            public var BulletCheck:Class;

            [Bindable]
            [Embed(source="assets/bulletWarning.png")]
            public var BulletWarning:Class;

            [Bindable]
            [Embed(source="assets/bulletCritical.png")]
            public var BulletCritical:Class;

            private function init():void {
                comboBox.dropdown.iconField = "icon";
            }
        ]]>
    </mx:Script>

    <mx:ComboBox id="comboBox"
            rowCount="4"
            width="200"
            themeColor="haloSilver"
            textIndent="5"
            selectedIndex="-1"
            prompt="Please select an item"
            creationComplete="init()">
        <mx:dataProvider>
            <mx:Array>
                <mx:Object label="Item 1" icon="BulletWarning" />
                <mx:Object label="Item 2" icon="BulletCritical" />
                <mx:Object label="Item 3" icon="BulletCritical" />
                <mx:Object label="Item 4" icon="BulletCheck" />
                <mx:Object label="Item 5" icon="BulletWarning" />
                <mx:Object label="Item 6" icon="BulletCheck" />
                <mx:Object label="Item 7" icon="BulletCheck" />
                <mx:Object label="Item 8" icon="BulletCritical" />
            </mx:Array>
        </mx:dataProvider>
    </mx:ComboBox>

</mx:Application>

 

分享到:
评论

相关推荐

    QHierarchy 4.2 最新版Unity插件

    - Displaying the list of GameObjects in the form of a tree - Option to add right indent (useful if you use other plugins that add another icons to the hierarchy window) - Any feature can be disabled ...

    Flex Solutions Essential Techniques For Flex 2 And 3

    简介 Book Description As a Flex developer, you'll no doubt come across repetitive problems every day in your workwouldn't it be nice to have a library of solutions to turn to, to solve these ...

    Visual C++ 编程资源大全(英文源码 控件)

    filedroplistctrl.zip This article explains how to support file drag and drop in your CWnd-derived object(40KB)&lt;END&gt;&lt;br&gt;83,DrivePickerList.zip A control that shows drive names and icons like ...

    Chat User Control with WebBrowser Control as Displaying Engine

    "Chat User Control with WebBrowser Control as Displaying Engine" 是一个技术主题,主要探讨如何利用Windows Forms中的WebBrowser控件作为聊天用户界面的显示引擎。这个标题暗示了一个自定义的用户控件(User ...

    Flex 4 in Action

    With the ability to compile and run Flex applications, the coding (a.k.a. the good stuff) begins with an overview of ActionScript—the core language of Flex. Progressively, you’ll put together all ...

    Foundation Flex For Developers - Data-Driven Applications With Php, Asp.Net, Coldfusion

    developers usually have to carry out a range of common tasks: communicating information to a user, displaying pop-up windows, showing repeating information in a tabular or grid layout, ...

    Displaying Data on a PC

    ### 显示PC上的数据:TinyOS中的传感器网络与PC集成 #### 一、引言 在本章节中,我们将探讨如何将传感器网络与个人电脑(PC)进行集成,以实现传感器读数在PC上的显示,并且能够从PC向传感器节点(motes)发送数据...

    VB编程资源大全(英文源码 控制)

    The control itself has all the events and properties that you need.&lt;END&gt;&lt;br&gt;48 , xgraphmeter.zip This is XGraphMeter, a bargraph/meter control good for displaying constantly changing values such ...

    Displaying Bitmaps Efficiently

    5. **Displaying Bitmaps in Your UI** - **Load Bitmaps into a ViewPager Implementation**:在ViewPager中加载位图,需要实现高效的图片滑动,比如使用`PagerAdapter`的`getBitmapForPosition(int position)`...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    which then affects on next flex-control output (in particular when the next flex-control have gradient fill). FlexEdit/FlexEditSE: - ADD Added checkbox "Keep connector's link" in flex-document ...

    Using Edit box as static Text Control for displaying ToolTip

    这个"Using Edit box as static Text Control for displaying ToolTip"的主题就是关于如何巧妙地结合这两者,以实现更灵活的界面设计。 首先,我们要理解Edit控件和Static控件的基本特性。Edit控件通常用于让用户...

    A slider widget with a popup bubble displaying the precise value selected..zip

    A slider widget with a popup bubble displaying the precise value selected..zip,A slider widget with a popup bubble displaying the precise value selected. Android library made by @Ramotion - ...

    DisplayingBitmaps

    "DisplayingBitmaps"这个主题主要关注如何有效地缓存和管理Bitmap以避免这样的问题。Google官方提供了一些最佳实践,包括使用LruCache和DiskCache来优化内存使用。 **LruCache** LruCache(Least Recently Used ...

    Qt:QStatusBar 和 QProgressBar 程序

    Qt:QStatusBar 和 QProgressBar 详细讲解 参见博客: http://blog.csdn.net/rl529014/article/details/51902345

    BCGControlBarPro.v12.00

    Please take a look at BCGPMSOffice2007Demo example (Backstage view pages) to see this new control in action. Implemented Resizable Dialogs support (see screenshot1 and screenshot2): Added 2 new ...

    Grid Control Based on CListCtrl

    Microsoft's CListCtrl has support for displaying data in a grid using the report style, but we have to make several changes to implement features like: •Sorting •Cell navigation and keyboard ...

    A_centralized_system_for_displaying_and_stylizing__

    A_centralized_system_for_displaying_and_stylizing__聚焦聚焦_A_centralized_system_for_displaying_and_stylizing__focus-rings.zip_A_centralized_system_for_displaying_and_stylizing__focus-rings

Global site tag (gtag.js) - Google Analytics