PDA

View Full Version : tbar listeners: {



koko2589
6 Dec 2011, 3:53 AM
how can i add listeners: {
to tbar?tankou?

itry :((


listeners: {
render: function(c){
c.getEl().on({
click: function(el){
//do someting//},
scope: c
});
}

},

tvanzoelen
6 Dec 2011, 3:58 AM
The syntax is



listeners{
render: {
fn: function(c){}
},
click: {
fn: function(c){},
scope: this
}
}

koko2589
6 Dec 2011, 9:39 AM
tankyou but i want from tbar
tb.add.listeners{

ldonofrio
6 Dec 2011, 10:08 AM
Use the new syntax "dockedItems"

tvanzoelen
7 Dec 2011, 12:19 AM
On you tabpanel you can specify a config for your tabBar



tabBar: {

listeners: {
render: {
fn: function(c){

}
}
}
}



If you add a Panel/Grid to the tab, its possible to set listeners on the tab of that panel. But maybe you dont need that.



tabConfig: {

listeners: {
click: {
fn: function(c){

}
}
}
}