HorizontalLayout does not work in RC2?

I tried the new Vaadin 7 RC2 and have big problems with the HorizontalLayout component.
I just doesn’t work. The HorizontalLayout works like a VerticalLayout in my case.

In my extended UI class I have the following code in the init-method;


@Override
    protected void init(VaadinRequest request) {
      
        setSizeFull();

        HorizontalLayout main = new HorizontalLayout();
        main.setSizeFull();
        main.addComponent(new Label("Component1"));
        main.addComponent(new Label("Component2"));
        setContent(main);
    }

I attach a screenshot to show how the components are written on the page.
Just like a VerticalLayout. The code is very basic just to test why this doesn’t work.
My real application looks different, but I wanted to check if I hade any issues in my
code, but when the above code I get the same confusing results. I can not be the
only one that has this problem? The HorizontalLayout is a very central component
that is used very often…

Se attached image.

EDIT: When i checked the source in chrome I checked and saw the labels was 100% width.
I then tried to set the setSizeUndefined-method on the labels. After that the labels wasn’t
100% width anymore, but I still got the same result. The HorizontalLayout works like a
VerticalLayout.
12768.png

My guess is that you are using an old version of the theme and/or the widget set. Check with ?debug.

That is very possible.
I upgraded from vaadin 6.
I will check that.

Thank you for the reply and hint :slight_smile:

That was the problem. Thank you.
Quite ambarrasing that I missed that i ran an older version of the theme (in this case runo). :slight_smile:

Hi, i have exactly the same problem.
I also upgraded from vaadin 6.

This is my pom.xml


com.vaadin
vaadin-server
7.0.1
compile


com.vaadin
vaadin-client-compiled
7.0.1
compile


com.vaadin
vaadin-themes
7.0.1
compile

and this is my styles.css

@import “…/reindeer/reindeer.scss”;

Please can you tell me how you solved ?

Many thanks

Carlo

Make sure you have refreshed everything (including browser caches) and there is no copy of a Vaadin 6 theme extracted from the JARs or something like that on the server.

You didn’t give much of your stylesheet, but you could read through
this tutorial
carefully if you haven’t already - it shows both how to use legacy-styles.css and how to do “pure” Vaadin 7 SCSS themes (importing reindeer.scss, including the mix-in in a suitable block, …) as well as how to compile a theme for production mode.

EDIT: … and make sure you also have a dependency on theme-compiler - either directly or indirectly.