在ext formpanel中使用layout table 布局中出现下拉框和日期框选择项偏离正轴,希望哪位高手能够解决解决,相应的panel代码如下:
var FrPost=new Ext.FormPanel({
width:'1200',
title:"ext级联",
bodyStyle:"padding:5px 5px 0",
submit: function(){
this.getEl().dom.action ='ggg',
this.getEl().dom.method='POST',
this.getEl().dom.submit();
},
buttons:[{
id:"succss",
name:"succss",
type : "button",
text:'提交数据',
formBind:true,
handler:function(){
FrPost.getForm().getEl().dom.submit();
}
},
{
name:'submit',
type : "submit",
text:'提 交',
formBind:true,
handler : function(){
FrPost.getForm().getEl().dom.submit();
}
},
{
name:'reset',
type:'reset',
text:'重 写',
handler:function(){
FrPost.getForm().getEl().dom.reset();
}
}]
});
var formpanel=new Ext.Panel({
layout:"table",
bodyStyle:'left:0px;top:0px;text-align:center;margin: 0 auto;',
cls:"center",
frame:true,
layoutConfig: {columns:2},
defaults:
{border:false,layout:'form',frame:false,labelAlign:'right',labelWidth:75,width:'400'}
});
FrPost.add(formpanel);
formpanel.add({colspan:1,rowspan:1,items:exttext_0});
formpanel.add({colspan:2,rowspan:8,items:imageext_1});
formpanel.add({colspan:1,rowspan:1,items:extradio_2});
formpanel.add({colspan:1,rowspan:1,items:extdate_3});
formpanel.add({colspan:1,rowspan:1,items:extdate_4});
formpanel.add({colspan:1,rowspan:1,items:exttext_5});
formpanel.add({colspan:1,rowspan:1,items:exttext_6});
formpanel.add({colspan:1,rowspan:1,items:exttext_7});
formpanel.add({colspan:1,rowspan:1,items:extselect_8});
//设置窗口显示大小
var windowWidth = window.screen.availWidth;
var left=windowWidth/2 - FrPost.width/2;
var style='margin-top:10px;margin-left:'+left+'px;';
var el=Ext.get('FrPost').applyStyles(style);
FrPost.render(el);
});