Hi,
I'm testing GXT 3.0.0b and building a sample app.
When nesting ContentPanel inside a TabPanel, i'm facing the following problem : the first tab is always displaying correctly but the content of the following tabs is not correct (only a part of the button is visible or the whole content is missing).
Here is the screenshot gxt_problem.jpg
And the source code of the example :
Code:
public class Application implements EntryPoint {
public void onModuleLoad() {
BorderLayoutContainer mainContainer = new BorderLayoutContainer();
TabPanel mainTabPanel = new TabPanel();
BorderLayoutData centerData = new BorderLayoutData();
centerData.setMargins(new Margins(5));
VerticalLayoutContainer mainContent = new VerticalLayoutContainer();
mainContent.add(mainTabPanel, new VerticalLayoutData(1, 1));
mainContainer.setCenterWidget(mainContent, centerData);
mainTabPanel.setBodyBorder(false);
mainTabPanel.setResizeTabs(true);
mainTabPanel.setTabWidth(Integer.MAX_VALUE);
VerticalLayoutContainer contentPanel1Container = new VerticalLayoutContainer();
ContentPanel contentPanel1 = new ContentPanel();
contentPanel1.setPixelSize(500, 250);
contentPanel1.addButton(new TextButton("Submit 1"));
contentPanel1Container.add(contentPanel1);
VerticalLayoutContainer contentPanel2Container = new VerticalLayoutContainer();
ContentPanel contentPanel2 = new ContentPanel();
contentPanel2.setPixelSize(500, 250);
contentPanel2.addButton(new TextButton("Submit 2"));
contentPanel2Container.add(contentPanel2);
mainTabPanel.add(contentPanel1Container, "Tab 1");
mainTabPanel.add(contentPanel2Container, "Tab 2");
Viewport viewport = new Viewport();
viewport.add(mainContainer);
RootPanel.get().add(viewport);
}
}
Is it possible to use a content panel inside a tab panel? Should I use another container?