jie6762198
jie6762198
2014-03-21 17:26

flex dataGrid 下拉框列中,下拉框选项看不到,选择一个之后在label中可以看到。有没有高手知道?

  • datagrid
  • combobox
  • flash

下拉框选项看不到任何东西。

选中第二个,出现下图的效果:

代码如下:

<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" 
   width="100%" paddingLeft="3" horizontalAlign="center">
 <mx:Script>
  <![CDATA[
   import mx.controls.Alert;
   import mx.controls.DateField;
   import mx.core.Application;
   
   [Bindable]
   [Embed(source='assets/icon_calendar.gif')]
   private var calendarIcon:Class;
   
   private var asignType:Array=[{label:"",value:0},{label:"开始固定",value:1},{label:"终了固定",value:2}]; 
   
   public function btnClick(event:MouseEvent):void {
    ExternalInterface.call("executeCalendar");
   }

   public function onChange():void {
    Application.application.isChanged = true;
    Application.application.dataGrid.selectedItem.assign_time_fu = txt.text;
   }
  ]]>
 </mx:Script>
 <mx:TextInput id="txt" width="55%" text="{data.assign_time_fu}" textAlign="center" focusOut="onChange()" maxChars="10" restrict="0-9/" />
 <mx:Button id="btn" icon="{calendarIcon}" width="12" click="btnClick(event)"/>
 <mx:ComboBox id="myComboBox" width="35%" dataProvider="{asignType}" labelField="label"/>
</mx:HBox>
 

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答