cgokey2
16 Mar 2011, 7:47 AM
I'm getting an overflow issue with this layout hierarchy:
A-Content Panel (Fit Layout), has a scroll bar
B-Layout Container (Fit Layout), has borders
C-Layout Container (Flow Layout) contains many widgets
if C exceeds the height of A and B, only A expands which is evident by the scroll bars, B doesn't seem to expand which is evident by the text in C overflowing outside of the border line of B. See screen shot.
https://files.me.com/cgokey/q8mt0u
Any help to make this kind of hierarchy work would be greatly appreciated.
Thanks,
Chris
import com.extjs.gxt.ui.client.Style;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.layout.FitData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.google.gwt.user.client.ui.Label;
public class TestAccordion extends LayoutContainer {
public TestAccordion() {
setLayout(new FitLayout());
ContentPanel contentPanel = new ContentPanel();
contentPanel.setLayout(new FitLayout());
contentPanel.setHeading("Overflow Issue");
contentPanel.setScrollMode(Style.Scroll.AUTOY);
LayoutContainer contentContainer = new LayoutContainer(new FitLayout());
contentContainer.setBorders(true);
LayoutContainer rowContainer = new LayoutContainer(new FlowLayout());
Label label;
for (int i=0; i<50; i++) {
label = new Label("The number is "+i);
rowContainer.add(label);
}
contentContainer.add(rowContainer);
contentPanel.add(contentContainer, new FitData(20));
add(contentPanel);
}
}
public void onModuleLoad()
{
RootPanel p = RootPanel.get();
LayoutContainer c = new LayoutContainer(new FitLayout());
c.setSize(500,500);
c.add(new TestAccordion());
p.add(c);
}
A-Content Panel (Fit Layout), has a scroll bar
B-Layout Container (Fit Layout), has borders
C-Layout Container (Flow Layout) contains many widgets
if C exceeds the height of A and B, only A expands which is evident by the scroll bars, B doesn't seem to expand which is evident by the text in C overflowing outside of the border line of B. See screen shot.
https://files.me.com/cgokey/q8mt0u
Any help to make this kind of hierarchy work would be greatly appreciated.
Thanks,
Chris
import com.extjs.gxt.ui.client.Style;
import com.extjs.gxt.ui.client.widget.ContentPanel;
import com.extjs.gxt.ui.client.widget.LayoutContainer;
import com.extjs.gxt.ui.client.widget.layout.FitData;
import com.extjs.gxt.ui.client.widget.layout.FitLayout;
import com.extjs.gxt.ui.client.widget.layout.FlowLayout;
import com.google.gwt.user.client.ui.Label;
public class TestAccordion extends LayoutContainer {
public TestAccordion() {
setLayout(new FitLayout());
ContentPanel contentPanel = new ContentPanel();
contentPanel.setLayout(new FitLayout());
contentPanel.setHeading("Overflow Issue");
contentPanel.setScrollMode(Style.Scroll.AUTOY);
LayoutContainer contentContainer = new LayoutContainer(new FitLayout());
contentContainer.setBorders(true);
LayoutContainer rowContainer = new LayoutContainer(new FlowLayout());
Label label;
for (int i=0; i<50; i++) {
label = new Label("The number is "+i);
rowContainer.add(label);
}
contentContainer.add(rowContainer);
contentPanel.add(contentContainer, new FitData(20));
add(contentPanel);
}
}
public void onModuleLoad()
{
RootPanel p = RootPanel.get();
LayoutContainer c = new LayoutContainer(new FitLayout());
c.setSize(500,500);
c.add(new TestAccordion());
p.add(c);
}