HeaderLayoutPanel?

93 views
Skip to first unread message

James Horsley

unread,
Aug 31, 2011, 3:18:22 AM8/31/11
to google-we...@googlegroups.com
Would love to have the naturally resizing header and footer but to
then add a SplitLayoutPanel as the center. Doing so causes nothing to
show which I'm guess is due to HeaderPanel not being a LayoutPanel?

Any plans for a HeaderLayoutPanel?

Cheers,
James

Thomas Broyer

unread,
Aug 31, 2011, 10:57:06 AM8/31/11
to google-we...@googlegroups.com

On Wednesday, August 31, 2011 9:18:22 AM UTC+2, James Horsley wrote:
Would love to have the naturally resizing header and footer but to
then add a SplitLayoutPanel as the center. Doing so causes nothing to
show which I'm guess is due to HeaderPanel not being a LayoutPanel? 

HeaderPanel is a RequiresResize, and if you look at its source, you'll see that it'll call onResize on its content widget if it's a RequiresResize too. I guess the reason HeaderPanel doesn't implement ProvidesResize is because it doesn't implement the behavior for the header and footer.
This does however make it a "layout panel".

In other words: it should work. (and I have no idea why it doesn't)

James Horsley

unread,
Aug 31, 2011, 4:31:24 PM8/31/11
to google-we...@googlegroups.com
Thanks for the breakdown Thomas. At first I thought it was something
particular to my application but I created a basic starter project and
it doesn't show the SplitPanelLayout with the super basic example
below. Oddly enough if you change the CSS position of the
SplitLayoutPanel element to static then it shows just fine with the
caveat that, although corner dragged resizes are handled okay, bottom
edge draggged resizes don't update the HeaderPanel's layout.

<g:HeaderPanel>

<!-- Header -->
<g:HTMLPanel> <h1>header</h1> </g:HTMLPanel>

<!-- Center -->
<g:SplitLayoutPanel>
<g:west size="200">
<g:HTMLPanel> <h2>Navbar</h2> </g:HTMLPanel>
</g:west>

<g:center>
<g:HTMLPanel> <h1>Stuff</h1> </g:HTMLPanel>
</g:center>
</g:SplitLayoutPanel>

<!-- Footer -->
<g:HTMLPanel> <h1>footer</h1> </g:HTMLPanel>

</g:HeaderPanel>

> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/Kpd-yKfZSuIJ.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

James Horsley

unread,
Sep 2, 2011, 7:47:03 AM9/2/11
to google-we...@googlegroups.com
Setting the height of the SplitLayoutPanel to 100% works, but he
problem of it not resizing when the browser is resized by dragging the
bottom border of the window. Corner and left/right dragging trigger a
layout just fine.
Reply all
Reply to author
Forward
0 new messages