I have a window with a caption and two buttons. The window caption is longer than two buttons and I got three dots in the window caption. Is there some way to fix it I mean get rid of dots and see the full caption? Maybe try other ways for example use label in window body but I am afraid of the result will be the same.
var win = new qx.ui.window.Window("First Window");
win.setLayout(new qx.ui.layout.HBox());
win.setShowMinimize(false);
var yesBtn = new qx.ui.form.Button("Yes");
var noBtn = new qx.ui.form.Button("No");
win.add(yesBtn);
win.add(noBtn);
this.getRoot().add(win, {left:20, top:20});
win.open();
CodePudding user response:
You can set the minimum width of the window (win.setMinWidth(150)
, or you can add a spacer after the buttons (win.add(new qx.ui.core.Spacer(80));
)
CodePudding user response:
If a caption can have dynamic size for example is read from configuration files. The way is not use caption for these purposes and use label in window.
var win = new qx.ui.window.Window("First Window");
win.setLayout(new qx.ui.layout.VBox());
win.setShowMinimize(false);
var questionLabel = new qx.ui.basic.Label("Do you wanna sleep?");
win.add(questionLabel);
var container = new qx.ui.container.Composite(new qx.ui.layout.HBox());
var yesBtn = new qx.ui.form.Button("Yes");
var noBtn = new qx.ui.form.Button("No");
container.add(yesBtn);
container.add(noBtn);
win.add(container);
this.getRoot().add(win, {left:20, top:20});
win.open();