Hi All,
I’m a bit confused with layouts in Vaadin. I’m using a CSS layout as I want to define the sizes of components in a style sheet. I have the following code…
layout = new CssLayout();
layout.addStyleName("main-layout");
this.setContent(layout);
VerticalLayout userInfo = new VerticalLayout();
userInfo.setStyleName("userInfo");
userInfo.setSizeUndefined();
layout.addComponent(userInfo);
I then set the size, background etc for the ‘userInfo’ layout in the CSS file for the theme. I find that the element.style overrides the style sheet and the height and width are set to 0px. I realize that’s because there aren’t any components in the ‘userInfo’ layout. (not yet anyway.) But how to I stop the size being set at the element level, I thought setSizeUndefined was ment to do that.
Panels seem to work a little better, but I don’t want the caption-wrap and the deco etc.
Should I be using VerticalLayouts? or just use Panels and hide the caption-wrap and deco sub-components?
Thanks,
Stuart.