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 <t.bro...@gmail.com> 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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to