Extjs的FormPanel加到TabPanel之后button的位置问题 是不是写高度或者margin,padding值了~··给顶下来了~· 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 补充一下, 我用的是ext2.3. 这段代码大体如下. var f = new Ext.FormPanel({ labelWidth: 200, region: 'center', title: 'Issuer Search', closable: true, bodyStyle: 'padding: 5px; line-height: 42px; margin: 0 auto;', defaultType: 'textfield', frame: false, height: 500, autoHeight: false, border: false, defaults: { width: '300px', lineHeight: '30px', margin: '10px' }, items: [ {xtype: 'hidden', name: 'lookupAction', value: 'issuer'}, {xtype: 'hidden', name: 'lookupAction', value: 'issuer'} ...<省略>... ], buttonAlign: 'left', buttons:[{ text: 'Lookup', scope: this, handler: this.submit },{ text: 'Reset', scope: this, handler: function(){f.getForm().reset();} }] }); centerRegion.add(f).show(); 因为你的formPanel的buttonAlign设置成了居左了 buttonAlign: 'left',改为buttonAlign : 'center' 要想使组件各行换色不像表格那么好处理但是我们可以折中处理 让组件的边框隔行换色 通过设置组件的style属性来完成 可以循环对formPanel的items这个数组进行循环操作 为每个对象增加 style:'border: green 1px solid' var items = Ext.getCmp('f这个panel的id').items;for(i =0,len =items.length;i<len;i++){ if(i%2 == 0){ items[i].style = "border: green 1px solid";//颜色你自己调调 }else{ items[i].style = "border: red 1px solid" } } (100分)学习了javascript基础后,该继续哪一步?请大神们说说 用javascript切换两张图片 oncontextmenu与onmousedown有何区别 window.open打开的窗口标题栏总是显示url,怎么去掉? 关于images数组 小问题? 如何通过javascript调用客户端应用程序 如何通过javascript将阳历转为阴历 急急!!!!!!请大家帮帮忙!!!!100分 <OBJECT>大全收集整理 高分求一个JS菜单效果 js如何截图
var f = new Ext.FormPanel({
labelWidth: 200,
region: 'center',
title: 'Issuer Search',
closable: true,
bodyStyle: 'padding: 5px; line-height: 42px; margin: 0 auto;',
defaultType: 'textfield',
frame: false,
height: 500,
autoHeight: false,
border: false,
defaults: {
width: '300px',
lineHeight: '30px',
margin: '10px'
},
items: [
{xtype: 'hidden', name: 'lookupAction', value: 'issuer'},
{xtype: 'hidden', name: 'lookupAction', value: 'issuer'}
...<省略>...
],
buttonAlign: 'left',
buttons:[{
text: 'Lookup',
scope: this,
handler: this.submit
},{
text: 'Reset',
scope: this,
handler: function(){f.getForm().reset();}
}]
});
centerRegion.add(f).show();
改为
buttonAlign : 'center'
但是我们可以折中处理 让组件的边框隔行换色 通过设置组件的style属性来完成
可以循环对formPanel的items这个数组进行循环操作 为每个对象增加 style:'border: green 1px solid'
var items = Ext.getCmp('f这个panel的id').items;
for(i =0,len =items.length;i<len;i++){
if(i%2 == 0){
items[i].style = "border: green 1px solid";//颜色你自己调调
}else{
items[i].style = "border: red 1px solid"
}
}