I have seen a bug with tab layouts and EM sizing in IE8. When I switch from Unit.EM to Unit.PX it worked.
TabLayoutPanel tp = new TabLayoutPanel(40, Unit.PX); Unix.EM worked in Chrome, but apparently at the time calculations are done in IE, the height is still 0. Also, the HeaderPanel is not a Layout Panel, and that will cause issues (I could never get a tab panel to have a height of 100% when place in a non-layout panel. Try looking at the DocLayoutPanel instead. -Neil On Jan 15, 5:34 am, James Scott <[email protected]> wrote: > Wrapping the TabLayoutPanel in a ResizeLayoutPanel, and then adding > the RLP as the content widget of the HeaderPanel, resulted in nothing > rendering in the content area. > > Here's my test code for my original case - I'm adding the HeaderPanel > directly to the RootLayoutPanel. > > public class TestHeaderEntryPoint implements EntryPoint { > > @Override > public void onModuleLoad() { > HeaderPanel hp = new HeaderPanel(); > TabLayoutPanel tp = new TabLayoutPanel(3, Unit.EM); > tp.add(new Label("This is tab 1"), "tab 1"); > tp.add(new Label("This is tab 2"), "tab 2"); > hp.setHeaderWidget(new Label("this is the header")); > hp.setContentWidget(tp); > hp.setFooterWidget(new Label("this is the footer")); > RootLayoutPanel.get().add(hp); > } > > } > > When I set a breakpoint in HeaderPanel.forceLayout I see that > remainingHeight is > 0 and (content instanceof RequiresResize) is > true, so I see content.onResize() get called...the tabs display, but > the tab body doesn't. > > Possibly interesting aside: When I declared the HeaderPanel and > TabLayoutPanel in a UiBinder .ui.xml, I saw that content ended up as > type FlowPanel, so HeaderPanel.forceLayout didn't call > content.onResize(). But the effect was the same - tabs display, but > tab bodies don't. > > JLS > > On Jan 15, 5:45 am, Thomas Broyer <[email protected]> wrote: > > > > > > > > > I've read a few times people complaining about HeaderPanel. Have you tried > > putting a ResizeLayoutPanel between the HeaderPanel and your > > TabLayoutPanel? It shouldn't be necessary, but there might be a bug in > > HeaderPanel. > > > Also, out of curiosity, is your HeaderPanel in a ProvidesResize widget? (up > > to a RootLayoutPanel or a panel with an explicit size in pixels) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
