Reputation: 3127
How can I set button width to wrap content? Default html button wraps content, but default sencha button use all width of parent. Next question. If button width wraps content, how to align button?
Thanks
Upvotes: 1
Views: 2523
Reputation: 6365
As far as I know, there is no Ext.Button config like textWrap: true in Sencha Touch 2. But you can try a work-around. Normally you can use width and height config to set absolute size of the button, and minWidth, maxWidth or minHeight, maxHeight for the lowerbound and upperbound of width and height, you should combine them with CSS styles of your text.
About alignment: Ext.Button is just like other Ext components, if it belongs to a parent container, then the config centered:true
should align it to the center of the parent container.
Upvotes: 2