PDA

View Full Version : tabpanel event



Sneha004
12 Mar 2012, 1:10 AM
Hi All,

Can any one tell me the event name when I click on the current tab on which i am working on?

Plz give solution as soon as possible

Thanks

vietits
12 Mar 2012, 1:24 AM
You can use 'tabchange' on TabPanel or 'activate' on tab item

Sneha004
12 Mar 2012, 1:44 AM
Thanks vietits for your quick reply,

tabchange event will be fired when I click on different tab.
But I want to click on same tab , then what will be the event name

I have used listeners also as

click:{
fn:function(){
//element: 'container',
console.log('click el');
alert('Hi');
}
}

but its not reflecting any output

Can Give me the exact solution please
:(

vietits
12 Mar 2012, 2:16 AM
The click event is only fired by tab item, so you should config your listeners with tab item by using tabConfig



var tabpanel = Ext.create('Ext.tab.Panel',{
...
items: [{
text: 'Tab 1',
...
tabConfig: {
listeners: {
click: function(){
console.log('Tab 1 is clicked');
}
}
},
? ...
}]
});

Sneha004
12 Mar 2012, 2:44 AM
Thank you so much for your quick reply

I did not mention listeners inside tabConfig .
So , it was not working


Thank you so much again.....:)