在把StatusBar放到一个Panel上时,如果这个panel在ViewPort中的South ,需要把 Panel的height 设置成 0 否则在ie7中,会有一个13px的空白。
var statusBar = new Ext.Panel({
// autoHeight: true,
[b] height:0,[/b]
// title: 'StatusBar',
region:'south',
// bodyStyle: 'padding:5px;',
bbar: new Ext.StatusBar({
id: 'southStatus',
// defaults to use when the status is cleared:
// defaultText: 'Default status text',
defaultIconCls: 'default-icon',
// values to set initially:
text: '',
iconCls: 'ready-icon',
// any standard Toolbar items:
items: [{
text: '软件',
handler: function() {
window.location = 'http://www.xxx.com.cn';
}
}, '-', {text:new Date().format('Y-m-d')},'-', clock]
}),
listeners:{
'render':{
fn:function() {
Ext.TaskMgr.start({
run:function() {
Ext.fly(clock.getEl()).update(new Date().format('g:i:s A'));
},
interval: 1000
})
}
}
}
});
本文介绍了解决在Internet Explorer 7浏览器中StatusBar布局出现的13px空白问题的方法。通过将包含StatusBar的Panel高度设置为0,可以避免此布局问题。文中还提供了一个使用ExtJS创建StatusBar组件的示例代码。
272

被折叠的 条评论
为什么被折叠?



