TabLayoutPanel or TabPanel shows nothing but the Tab

152 views
Skip to first unread message

fg

unread,
May 21, 2012, 5:50:32 AM5/21/12
to Google Web Toolkit
GWT 2.4

public void onModuleLoad() {

TabLayoutPanel tabLayoutPanel = new TabLayoutPanel(2.5, Unit.EM); //
or using TabPanel instead
tabLayoutPanel.add(new Label("hi"), "tab");
RootPanel.get().add(tabLayoutPanel);

}

It only shows the tab, but the label (or other kind of widget under
test) is invisible. Why?

Thomas Broyer

unread,
May 21, 2012, 5:56:40 AM5/21/12
to google-we...@googlegroups.com
Layout panels (RequiresResize) should go into other layout panels (ProvidesResize) or be given explicit size.
 

fg

unread,
May 21, 2012, 7:30:35 AM5/21/12
to Google Web Toolkit
Thanks a lot for reminding of the contracts for layout panels to be
satisfied with.

Why does TabPanel encounter the same problem? Does it strictly belong
to layout panels?

What makes me more puzzled is that both TabLayoutPanel and TabPanel
sporadically bring the contained widgets to forground by default.
> Seehttps://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels...
Reply all
Reply to author
Forward
0 new messages