Hi, I tried for an hour to get a simple layout done. This is the code:
And this is how it looks like:
Now several question I couldn't find answers for in the documentation:
Thanks! I really tried hard and now I'm a bit frustrated because it should actually be really easy.
SmartClient Version: v11.1p_2017-07-03/LGPL Development Only (built 2017-07-03)
Chrome Version 64.0.3282.186
Code:
public class ProgressWindow extends Window { ProgressWindow() { setTitle("Progress window title"); setAutoSize(true); setBackgroundColor("red"); layout = new VLayout(); layout.setMembersMargin(10); layout.setBackgroundColor("blue"); Label test_label = new Label("Test label with long text"); test_label.setBackgroundColor("green"); layout.addMember(test_label); Label test_label2 = new Label("Test label 2 with even longer text"); test_label2.setWrap(false); test_label2.setBackgroundColor("grey"); layout.addMember(test_label2); addMember(layout); } }
Now several question I couldn't find answers for in the documentation:
- Why is the window title abbreviated? How can I set it to use the available space? And how can set the window width to be at least the width the window title requires?
- How can I make the first label to use the available width? (Without setting wrapping to false. The text is actually dynamic and wrapping should be kept if the width is not sufficient.)
- What is the white space at the bottom and how can get rid of it?
- What is the logic behind the total window height and the height of the labels? Is it some kind of constant and where can I find more information about it? I actually want the window height to fit to the content. But this should work by using setAutoHeight() for both labels.
Thanks! I really tried hard and now I'm a bit frustrated because it should actually be really easy.
SmartClient Version: v11.1p_2017-07-03/LGPL Development Only (built 2017-07-03)
Chrome Version 64.0.3282.186
Comment