Hi, I’m trying to show a HorizontalLayout with two columns: the left column is a VerticalLayout with a TextField to search some text and a Table with the results; the right column is VerticalLayout containing a form.
The left column has height 100% and width 25em, the right column has height 100% and must expand to fill the remaining space so I used setExpandRatio().
As you see in the attached image, the right column hides the left column: is this a bug? I missed something?
I’m using Vaadin 7.0.3 and Chrome.
Here is the simplified test case:
import com.vaadin.server.VaadinRequest;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;
public class StatmanagerUITest extends UI {
private HorizontalLayout mainLayout;
private VerticalLayout listPanel;
private VerticalLayout formPanel;
@Override protected void init(VaadinRequest request) {
mainLayout = new HorizontalLayout();
mainLayout.setSizeFull();
mainLayout.setMargin(true);
mainLayout.setSpacing(true);
setContent(mainLayout);
mainLayout.addComponent(listPanel = new VerticalLayout());
listPanel.setWidth("25em");
listPanel.setHeight("100%");
TextArea text1 = new TextArea();
text1.setSizeFull();
listPanel.addComponent(text1);
mainLayout.addComponent(formPanel = new VerticalLayout());
formPanel.setSizeFull();
mainLayout.setExpandRatio(formPanel, 1f);
TextArea text2 = new TextArea();
text2.setSizeFull();
formPanel.addComponent(text2);
}
}
Thanks
Claudio