日期:2014-05-17 浏览次数:20682 次
var tabPanel = Ext.create('Ext.tab.Panel', {
frame: false,
fitToFrame: true,
tabBar: {
height: 22,
defaults: {
height: 22
}
},
deferredRender: false
});
function addTabPage(title, form) {
var index = tabPanel.items.length + 1;
for (var i = 0; i < tabPanel.items.length; i++) {
var tab = tabPanel.items.getAt(i);
var t = tab.title;
if (t == title) {
tabPanel.setActiveTab(tab);
return false;
}
}
var tabPage = tabPanel.add({
xtype: 'panel',
title: title,
layout: 'fit',
fitToFrame: true,
closable: false
})
tabPage.add(form);