1. 程式人生 > >Ext form中的combobox一旦設hideTrigger:true不但下拉按鈕隱藏

Ext form中的combobox一旦設hideTrigger:true不但下拉按鈕隱藏

%@ page language="java"  pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <link rel="stylesheet" type="text/css" href="ext-2.2/resources/css/ext-all.css" />
    <script type="text/javascript" src="ext-2.2/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="ext-2.2/ext-all.js"></script>
    <script type="text/javascript" src="ext-2.2/source/locale/ext-lang-zh_CN.js"></script>
  </head>
<body>
<script type="text/javascript">

  var data3=[["資訊模板資料","資訊模板資料"],["照片資料","照片資料"],["其他檔案","其他檔案"]];
  var store3=new Ext.data.SimpleStore({data:data3,fields:["name","value"]});
  var form1=new Ext.form.FormPanel({
            layout:"form",
            title:"test",
            frame:true,
            items:[
                   new Ext.form.ComboBox({
                         fieldLabel:"檔案型別",
                         name:"uploadType",
                         store:store3,
                         displayField:"name",
                         valueField:"value",
                         triggerAction:"all",
                         hideTrigger:true,
                         anchor:"50%",
                         mode:"local"                 
                   })
                   ]
        
        });
   Ext.onReady(function(){
        new Ext.Viewport({
           layout:"fit",
           items:[form1]
        
        });
   
   });
</script>
</body>
</html>


解決辦法

在css中需要新增
.ext-ie .x-form-text {position:static !important;}

使文字框固定到位置