1

First here is the code :

  mainLayout = new AbsoluteLayout();
mainLayout.setImmediate(false);

// body
HorizontalSplitPanel panel = new HorizontalSplitPanel();

panel.setFirstComponent(getFirstPanel());
panel.setSplitPosition(10, Unit.PERCENTAGE);
panel.setSecondComponent(getSecondPanel());

// absoluteLayout_2
body = new AbsoluteLayout();
body.addComponent(panel);
body.setImmediate(false);
body.setSizeUndefined();
body.setStyleName("Mybody");
mainLayout.addComponent(body, "top:160.0px;right:1.0px;bottom:45.0px;left:0.0px;");
mainLayout.setSizeUndefined();

Panel mainPanel = new Panel();
mainPanel.setContent(mainLayout);
mainPanel.setSizeFull();
// mainPanel.getContent().setSizeUndefined();

when I open the page nothing is displayed. It seems that all my layout that are inside my Panel have size : width:0px;height:0px;.

When I change the size as setSizefull() for all the layout it works but the panel does not scroll. Any idea what I forgot in the code above ?

deltascience
  • 3,321
  • 5
  • 42
  • 71

1 Answers1

0

setSizeFull() usually disables scrollbars, use setSizeUndefined() and scrollbars will appear if the component is big enough

tlw
  • 36
  • 2
  • When I use setSizeUndefined() all my components have 0 width and Height. I don't want to give them a fixed size because the content change dynamically. – deltascience May 21 '14 at 07:49