Wednesday, August 31, 2011

Re: HeaderLayoutPanel?

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>

On 31 August 2011 15:57, Thomas Broyer <t.broyer@gmail.com> wrote:
>
> 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)
>
> --
> 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-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment