下面是运行良好的代码。
Ext.Msg.show({
title: 'The title',
message: 'and some text...',
scope: this,
buttons : [
{
itemId : 'no',
text : 'Top button'
},
{
itemId : 'yes',
text : 'Bottom button'
}
],
fn: function(btn) {
if (btn == 'yes'){
//do something
}
}
});
如何垂直对齐按钮?默认情况下,它们水平地排列在一行中。
发布于 2013-07-24 11:27:54
如果您的Ext.Msg.Show
中只有两个按钮,则可以使用“停靠”属性实现所需的结果。(像这样):
祝好运!
以下是更新的代码:
Ext.Msg.show({
title: 'The title',
message: 'and some text...',
scope: this,
buttons : [
{
docked: 'top',
itemId : 'no',
id: 'no',
text : 'Top button'
},
{
docked: 'bottom',
itemId : 'yes',
id : 'yes',
text : 'Bottom button'
}
],
fn: function(btn) {
if (btn == 'yes'){
//do something
}
}
});
https://stackoverflow.com/questions/17830846
复制相似问题