Reputation: 11
Is there a way in Ext.js ext-4.2.1, to left-align two buttons in an Ext.MessageBox?
Starting with (which works):
Ext.MessageBox.show({ title:'AA',
msg: 'BB',
prompt: true,
buttonText: {ok:'Proceed', cancel:'STET'},
fn: function (btn, groupName) {...}
});
The documentation of "buttons:" is clearly wrong and does not display buttons, at "ok:'Foo..." (below).
Can "buttons" be used to specify id, name, and other properties of several buttons, and if so, what is a working example?
" buttons Object/Boolean A button config object (e.g., Ext.MessageBox.OKCANCEL or {ok:'Foo', cancel:'Bar'}), "
source: http://dev.sencha.com/playpen/docs/output/Ext.MessageBox.html
Upvotes: 1
Views: 733
Reputation: 6095
You could achieve what you want by adding custom buttons to the dialog:
Ext.MessageBox.show({ title:'AA',
msg: 'BB',
prompt: true,
fn: function (btn, groupName) {console.log("fn called");}
}).add([{xtype: 'button', text: 'button1'}, {xtype: 'button', text: 'button2'}]);
From there, you can do whatever you want to the buttons. I've omitted the handlers in this example, but this should give you a starting place.
Upvotes: 1