PDA

View Full Version : Adding a click or tap listener to a component.



kortovos
28 Oct 2010, 3:22 AM
I am trying to get a click or tap event on a component, but there are no click or tap events for Ext.component.

Does anyone know how to do this?

gorekee
28 Oct 2010, 5:00 AM
one way is to implement a listener on a element



listeners: {
afterrender: function (c) {
c.el.on('click', function () {
alert('click');
})
}
}


looking for listeners in sencha touch api http://dev.sencha.com/deploy/touch/docs/

kortovos
28 Oct 2010, 5:18 AM
Thanks, works like a charm.