設定icon(小箭頭)的顏色在combox中

marshane發表於2008-07-05

下面這個例子給我們展示了 如何設定圖示icon (箭頭)的顏色在combox中 下面是原始碼:

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"         layout="vertical"         verticalAlign="top"         backgroundColor="white">     <mx:Array id="arr">         <mx:Object label="One" />         <mx:Object label="Two" />         <mx:Object label="Three" />         <mx:Object label="Four" />         <mx:Object label="Five" />         <mx:Object label="Six" />         <mx:Object label="Seven" />         <mx:Object label="Eight" />         <mx:Object label="Nine" />         <mx:Object label="Ten" />     </mx:Array>     <mx:ApplicationControlBar dock="true">         <mx:Form styleName="plain">             <mx:FormItem label="iconColor:">                 <mx:ColorPicker id="colorPicker" />             </mx:FormItem>         </mx:Form>     </mx:ApplicationControlBar>     <mx:ComboBox id="comboBox"             dataProvider="{arr}"             iconColor="{colorPicker.selectedColor}" /> </mx:Application>

好了 算是一個資料binding的小例子 ~~

 

相關文章