1

I am working on a project that uses Google Web Toolkit (GWT). I am using a dock layout panel to layout a webpage. In the CENTER, I have a flow panel that adds a set of children with different sizes. When the number of widgets becomes large, then CENTER panel doesn't re-size to include these new widgets. How can I make the dock layout panel resize the center panel so that all the children widgets of the flow panel in the center panel are all shown clearly? I would greatly appreciate it if anyone could provide some information on this. I know that the dock layout panel uses absolute positioning but the flow panel I have is set to dynamically resize when the flow panel has multiple widgets.

Thanks,

MPH

Mr.Powers
  • 163
  • 7

2 Answers2

1

The purpose of GWT ***LayoutPanel widgets is to provide predictable, pixel perfect layout in every browser, as a result it's not possible for the DockLayoutPanel to resize it's center component. Your N, S, E, W components have fixed sizes. How do you expect the DockLayoutPanel to maintain those component sizes AND resize the center component to accomodate growing content inside?

Strelok
  • 50,229
  • 9
  • 102
  • 115
1

Add the docklayout panel on rootlayout panel den it will resize properly:

DockLayoutPanel p = new DockLayoutPanel(Unit.EM);

/*add N S E W compenents */

RootLayoutPanel rp = RootLayoutPanel.get();

rp.add(p);

hope this will work for you.

blackberry dev
  • 371
  • 2
  • 5
  • 16