我正在使用3个按钮进行sap.m.Dialog控件工作,我需要在左侧显示按钮“A”,在中间按钮“B”并按钮“C”在右侧。sap.m.Dialog按钮聚合中按钮之间的空间聚合
请参考下面的代码和截图
Controller.js
var oDialog = new Dialog({
title: "Dialog",
type: 'Message',
content: new Text({ text: "" }),
buttons : [
new sap.m.Button({
text: "A"
}),
new sap.m.Button({
text: "B"
}),
new sap.m.Button({
text: "C"
})
],
afterClose: function() {
oDialog.destroy();
}
});
oDialog.open();
我的解决方法:
var oDialog = new Dialog({
title: "Dialog",
type: 'Message',
content: new Text({ text: "" }),
buttons : [
new sap.m.Button({
text: "A"
}),
// below added few dummy buttons to show space like effect at UI
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({
text: "B"
}),
// below added few dummy buttons to show space like effect at UI
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({text: "", visible:true, enabled:false}),
new sap.m.Button({
text : "C"
})
],
afterClose: function() {
oDialog.destroy();
}
});
oDialog.open();
我已经添加的按钮与空白的文本后,不知何故,我已经实现显示空格键之间,但这是在加样作用空间正道UI?或者有什么合适的方法来满足我的要求?
您的解决方法是否适用于移动设备? – Marc
它的工作,但用户界面得到了符文,只有一个按钮是可见的右手柄一侧,其余的2按钮有自动隐藏进overflowButton – Prashob
我只是想知道你的“空”按钮显示。 – Marc