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;}

使文本框固定到位置


 

你可能感兴趣的:(html,function,ext,layout,stylesheet,照片)