Monday, June 25, 2012

Clickable panel in sencha touch 2.0


Some time we need to click on panel and do something but sencha touch panel has no tap event.

Using below code we can click the panel and call any function.

xtype:'panel',
listeners:{
 painted:function(ele){
     ele.element.on('tap',function(){
                      console.log('you click panel');
     });
 }
}

Thanks,
Naresh