View Full Version : How to use an image as a button ? (not button with icon provided by SenchaTouch) ?

20 Jul 2011, 10:29 PM

I have started learning SenchaTouch a few days ago.
I have a web application which uses images (HTML <img> tag) as buttons.
So onclick or ontouch the image's src should change to give user a feel that touch or click has happened.

How can I use the same image resources in my SenchaTouch app ?
Which component to use ?
Any example code would be of great help in this direction.

Thanks in advance !

21 Jul 2011, 1:54 AM
You can try button with your desired image see here (http://www.sencha.com/forum/showthread.php?140056-Performance-issue-when-using-images-for-buttons&p=625025&viewfull=1#post625025)

21 Jul 2011, 2:04 AM
Can you please give me a full example of showing image as a button in a panel ?
I am new to Sencha Touch so I am finding it a bit hard to use the solution you described.
To say it again, I would like to use "an image as a button", but "not an image as an icon in button".
Can you please give me a detailed example, that would really help in understanding.