Expand Ration is not working


Im using Vaadin Version 7.4.5 then when I use setExandRation on my component to 1.0f it will accomodate all the space…
What is the problem of my code ?

   HorizontalLayout formLayout = new HorizontalLayout();
    formLayout.setSizeFull();
    formLayout.addStyleName("form-layout");
    layout.addComponent(formLayout);
    layout.setExpandRatio(formLayout, 1.0f);
    
    FormLayout coopInfo = new FormLayout();
    formLayout.addComponent(coopInfo);
    
    ComboBox coopName = new ComboBox();
    coopName.setCaption("Coop name");
    coopInfo.addComponent(coopName);
    
    TextField coopNumber = new TextField();
    coopNumber.setCaption("Coop #");
    coopInfo.addComponent(coopNumber);

What is the issue? Expand ratio 1.0f will let the component accomodate all the space. Are other components not shown in the screen?

yes… instead the component that I set to 1.0f ratio will be shown.

Try setting sizefull for coopinfo.

I’ll try sir … and thanks for yout help :slight_smile: