Feature Request: allow addTab to accept objects
January 6th, 2009if you need to do something special with addTab you could always add custom functionality yourself like so
Ext.override(Ext.TabPanel, {
addTab : function(cfg, text, content, closable) {
var id;
if (typeof(cfg) == 'string') { // check typeof cfg
id = cfg;
} else if (typeof(cfg) == 'object') {
id = cfg.id;
// do your own thing here with the cfg object
// ...
// ...
}
var item = new Ext.TabPanelItem(this, id, text, closable);
this.addTabItem(item);
if (content) {
item.setContent(content);
}
return item;
}
});
#If you have any other info about this subject , Please add it free.# |