abickford
18 Jul 2008, 5:00 AM
Invisible components still take up space w/layouts. For example:
public void onModuleLoad() {
ContentPanel cp = new ContentPanel();
cp.setLayout(new FillLayout());
ContentPanel child1 = new ContentPanel();
cp.add(child1);
ContentPanel child2 = new ContentPanel();
child2.setVisible(false);
cp.add(child2);
Viewport vp = new Viewport();
RootPanel.get().add(vp);
vp.setLayout(new FillLayout());
vp.add(cp);
return;
}
I feel that 'child1' should fill the entire container since child2 is invisible. Is this a bug?
public void onModuleLoad() {
ContentPanel cp = new ContentPanel();
cp.setLayout(new FillLayout());
ContentPanel child1 = new ContentPanel();
cp.add(child1);
ContentPanel child2 = new ContentPanel();
child2.setVisible(false);
cp.add(child2);
Viewport vp = new Viewport();
RootPanel.get().add(vp);
vp.setLayout(new FillLayout());
vp.add(cp);
return;
}
I feel that 'child1' should fill the entire container since child2 is invisible. Is this a bug?