-
5 Jan 2012 7:03 AM #1
Tap event in a Panel
Tap event in a Panel
Hi,
I am trying to catch a tap event on a panel but I can't get it work. I am using Sencha Touch PR 2.
Could someone help me and let me know if I am doing anything wrong?
Thanks!!!
Here is my code:
Code:{ xtype: 'panel', id: 'myId', height: 120, layout: { type: 'hbox', align: 'stretch' }, items: [ { width: 130, height: 120, listeners: { afterrender: function(c){ c.el.on('click', function(){ console.log ('click'); }); c.el.on('tap', function(){ console.log ('tap'); }); } } }, { flex: 1, height: 120, } ] }
-
5 Jan 2012 8:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
There is no afterrender event. You should use the painted event.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
5 Jan 2012 8:31 AM #3
-
5 Jan 2012 8:35 AM #4
It worked!! I do appreciate your help mitchellsimoens!!


Reply With Quote