lightblade
25 Oct 2008, 10:23 PM
I tried adding another panel to a TabItem, but it just doesn't show anything. It seem to work if I add Label directly.
After compiling it, I notice this problem only present in IE, and not Firefox.
public void onModuleLoad() {
TabPanel panel = new TabPanel();
panel.setTabPosition(TabPosition.BOTTOM);
TabItem tab1 = new TabItem();
tab1.setText("tab1");
ContentPanel simp = new ContentPanel();
simp.setHeight(100);
simp.add(new Label("tab1"));
tab1.add(simp);
TabItem tab2 = new TabItem();
tab2.setText("tab2");
ContentPanel simp2 = new ContentPanel();
simp2.setHeight(100);
simp2.add(new Label("tab2"));
tab2.add(simp2);
panel.add(tab1);
panel.add(tab2);
RootPanel.get().add(panel);
}
After compiling it, I notice this problem only present in IE, and not Firefox.
public void onModuleLoad() {
TabPanel panel = new TabPanel();
panel.setTabPosition(TabPosition.BOTTOM);
TabItem tab1 = new TabItem();
tab1.setText("tab1");
ContentPanel simp = new ContentPanel();
simp.setHeight(100);
simp.add(new Label("tab1"));
tab1.add(simp);
TabItem tab2 = new TabItem();
tab2.setText("tab2");
ContentPanel simp2 = new ContentPanel();
simp2.setHeight(100);
simp2.add(new Label("tab2"));
tab2.add(simp2);
panel.add(tab1);
panel.add(tab2);
RootPanel.get().add(panel);
}