If the button width is set using width: '400' it will be ignored. Both width: 400 and width: '400px' will set the width. I ran this in Fiddle with both the 5/22 nightly build and Sencha Touch 2.3.1.
The Sencha docs are
width : Number/ String
The width of this Component; must be a valid CSS length value, e.g: 300, 100px, 30%, etc. ...
Larry
The Fiddle code:
Ext.application({
name : 'Fiddle',
launch : function() {
//Ext.Msg.alert('Fiddle', 'Welcome to Sencha Fiddle!');
Ext.Viewport.add(Ext.create('Ext.Panel', {
items: [
{
xtype: 'button',
text: 'Confirm',
ui: 'confirm'
},
{
xtype: 'button',
text: 'Confirm',
ui: 'confirm',
width: 400
},
{
xtype: 'button',
text: 'Confirm',
ui: 'confirm',
width: '400px'
},
{
xtype: 'button',
text: 'Confirm',
ui: 'confirm',
width: '400'
}
]
}));
}
});
Aucun commentaire:
Enregistrer un commentaire