I am working on sap.m.Dialog control with 3 buttons and i need to show button "A" on the left side, button "B" in the middle and button "C" on the right side.
Please refer below code and screenshot
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();
My workaround:
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();
How it looks after adding empty buttons
i have added button with blank text, somehow i have achieved to show spaces in between buttons, but is this a right way to add space like effect at UI ? or is there any proper way to satisfy my requirement ?