[Flex] ButtonBar系列——最后一个项目的样式设置

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
        ]]>
    </fx:Script>
    <fx:Declarations>
        <!-- 将非可视元素(例如服务、值对象)放在此处 -->
    </fx:Declarations>
    <fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace mx "library://ns.adobe.com/flex/mx";
        .lastButton{
            color:blue;
            cornerRadius:20;
            fontWeight:normal;
            chromeColor:haloGreen;
        }
    </fx:Style>
    <mx:ButtonBar id="buttonBar" dataProvider="[red,orange,yellow,green,blue]" lastButtonStyleName="lastButton"  />
    <!--<s:ButtonBar dataProvider="{new ArrayCollection(['red','orange','yellow','green','blue'])}"/>-->
</s:Application>

 

posted on 2015-10-15 11:50  晏过留痕  阅读(284)  评论(0编辑  收藏  举报