Panel does not show horizontal scrollbar

Hello,

I ran into an issue where Vaadin Panel does not display horizontal scrollbar. Here is my layout.

The main window’s layout is AbsoluteLayout. An AbsoluteLayout and VerticalLayout are added to this AbsoluteLayout. The VerticalLayout contains AbsoluteLayout and Panel. The Panel has VerticalLayout and I want vertical as well as horizontal scrollbars for this Panel.

In a tree like structure it looks as following:

  1. Window

    1.1. AbsoluteLayout ( layout.setSizeFull(); layout.setMargin(false); )

      1.1.1. AbsoluteLayout  ( layout.setHeight("200px"); layout.setMargin(false); )
    
      1.1.2. VerticalLayout     ( layout.setMargin(false); layout.setSpacing(false); )
    
              1.1.2.1. AbsoluteLayout    (  layout.setHeight("50px");  }
              1.1.2.2. Panel      (   panel.setScrollable(true); panel.setSizeFull(); panel.getContent().setSizeUndefined();  )
                      1.1.2.2.1 VerticalLayout  
                              1.1.2.2.1.1  AbsoluteLayout ( layout.setHeight("50px"); )  
                              1.1.2.2.1.2  AbsoluteLayout ( layout.setHeight("50px"); )  
                              1.1.2.2.1.3  AbsoluteLayout ( layout.setHeight("50px"); )  
                              1.1.2.2.1.4  AbsoluteLayout ( layout.setHeight("50px"); )  
                              1.1.2.2.1.5 AbsoluteLayout ( layout.setHeight("50px"); )  
                              1.1.2.2.1.6   AbsoluteLayout ( layout.setHeight("50px"); )  
                              1.1.2.2.1.7 and so on...
    

The panel does not display scrollbars. Any ideas or suggestion on use of layouts.

Thanks

I think it is because your Panel (1.1.2.2) is inside an AbsoluteLayout (1.1.2.1) which has no width defined.
I haven’t used much the AbsoluteLayout but try setting a fixed width on it or directly on the Panel to see if it fixes the problem.