Flow Panel in a Dock Layout Panel issue

475 views Asked by At

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

2

There are 2 answers

0
blackberry dev On

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.

0
Strelok On

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?