faithoffly
5 Dec 2011, 11:17 AM
i'm a new comer from China, so please pardon me for any possible misspell.
till now everything works fine,but i have problem when trying to add a listener to a tab panel when experiencing.i search for it on the ext.tab.panel API but i don't quit understand
activate( Ext.Component this, Object eOpts ) how to pass a Object,and why do i need to do that?
var contentPanel = Ext.create('Ext.tab.Panel', {
id: 'content-panel',
region: 'center',
border: false,
minTabWidth : 150,
defaults: {
autoScroll:true,
bodyPadding: 0
},
activeTab: 0,
border: false,
listeners: {
activate: function(selModel, Cmp){
alert('a');//didn't show anything
var activeTabIndex = this.getActiveTab().index;
if (Ext.getDom(activeTabIndex + '-details')){
detailEl.hide().update(Ext.getDom(activeTabIndex + '-details').innerHTML).slideIn('l', {stopAnimation:true,duration: 200});
}
else{
detailEl.hide().update(Ext.getDom('empty-panel-details').innerHTML).slideIn('l', {stopAnimation:true,duration: 200});
}
}
},
items: [{
id: 'HomePage',
title: 'start',
iconCls:'home',
layout: 'fit',
bodyStyle: 'padding:25px',
bodyPadding: 20,
closable: true,
contentEl: 'start-div' // pull existing content from the page
}]
});
besides i'm using 4.07 ExtJS and the font size of trees and tab panel strip is very small in ie9 and Firefox? Is that a bug or smth?
till now everything works fine,but i have problem when trying to add a listener to a tab panel when experiencing.i search for it on the ext.tab.panel API but i don't quit understand
activate( Ext.Component this, Object eOpts ) how to pass a Object,and why do i need to do that?
var contentPanel = Ext.create('Ext.tab.Panel', {
id: 'content-panel',
region: 'center',
border: false,
minTabWidth : 150,
defaults: {
autoScroll:true,
bodyPadding: 0
},
activeTab: 0,
border: false,
listeners: {
activate: function(selModel, Cmp){
alert('a');//didn't show anything
var activeTabIndex = this.getActiveTab().index;
if (Ext.getDom(activeTabIndex + '-details')){
detailEl.hide().update(Ext.getDom(activeTabIndex + '-details').innerHTML).slideIn('l', {stopAnimation:true,duration: 200});
}
else{
detailEl.hide().update(Ext.getDom('empty-panel-details').innerHTML).slideIn('l', {stopAnimation:true,duration: 200});
}
}
},
items: [{
id: 'HomePage',
title: 'start',
iconCls:'home',
layout: 'fit',
bodyStyle: 'padding:25px',
bodyPadding: 20,
closable: true,
contentEl: 'start-div' // pull existing content from the page
}]
});
besides i'm using 4.07 ExtJS and the font size of trees and tab panel strip is very small in ie9 and Firefox? Is that a bug or smth?