3

I want to know, how to create a button that looks like this: (everything inside the gray container is a button)

How can I put picture and text inside button? XTemplate? CSS in text property?

Thank you!

Sencha Touch 2

enter image description here

Solution:

{
    xtype: 'button',
    html: '<img style="margin-left: 35px;" src="http://www.timwickstrom.com/wp-content/uploads/2011/06/beer1.png" width="200" height="200" /><br /><span style="your style">Beer</span>',
}
NullCod3
  • 321
  • 1
  • 3
  • 10

1 Answers1

1

You can try to use html config:

xtype: 'button',
html: '<img src="your image source"/> width="" height=""'
text: '50$'
Felix
  • 37,892
  • 8
  • 43
  • 55
  • I could kiss you right now but that would be gay! XD Thank you! BTW. text property doesn't work when I have HTML property. In my question I will put my solution. – NullCod3 Jan 15 '14 at 07:23