View Full Version : Custom images as buttons

14 Sep 2010, 8:15 PM
I'm new to Sencha Touch. I've searched the forums for a simple way to have a custom icon button but cannot seem to find anything. In my example I just have a panel with a button for testing (trying to understand the framework).

items: [{
xtype: 'button',
icon: '/images/test-icon.png',
handler: handlerTest

This doesn't seem to work probably because it's wrong. All that is displayed is a blank button image as the default ui: 'normal' format. Looking at the API documentation I see iconMask and iconCls. I think these options are for built in icons in the framework but I'm not certain. Does any one have a simple example on how to do this?

14 Sep 2010, 8:25 PM

15 Sep 2010, 1:19 PM
Yep, this is currently under development as well, will be much more polished in the next release. Thanks-

15 Sep 2010, 5:33 PM
Looks like it works if it's part of a toolbar but not if it's a button on it's own. I'll play around with it and see what I can come up with.