如何设置让combox 显示成TextBox 样子.

来源:互联网 发布:淘宝电子面单是什么 编辑:程序博客网 时间:2024/05/16 17:02

 通过设置属性arrowButtonWidth 宽度为0,即看不到combox那个三角

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"  layout="absolute" minWidth="1024" minHeight="768">
 
 <mx:Script>
  <![CDATA[
   private function init():void{
    cm.editable=true;
    cm.rowCount=5;
    cm.selectedIndex=-1;  
    cm.setStyle("cornerRadius",0);
    cm.setStyle("arrowButtonWidth",0);
    cm.setStyle("fontWeight","normal");
    cm.setStyle("paddingLeft",0);                   
   }
  ]]>
 </mx:Script>
 <mx:ComboBox x="204" y="202" id="cm"  initialize="init();" ></mx:ComboBox>
 
</mx:Application>
  

原创粉丝点击