Suppose that you have :
<g:DockLayoutPanel unit='PX' ui:field="dlp">
<g:north size='100'>
<g:SimplePanel ui:field="headerContainer">
<g:HTMLPanel ui:field="headerContent">
(... content that can change ...)
</g:HTMLPanel>
</g:SimplePanel>
</g:north>
<g:center>
(...)
</g:center>
</g:DockLayoutPanel>
You can manually resize header after a modification of his content by
calling :
dlp.setWidgetSize(headerContainer, headerContent.getOffsetHeight());
dlp.forceLayout();
Alexandre
2011/4/15 Eric Andresen <[email protected]>
> Does anyone know if it is possible to create a layout panel that behaves
> like a dock layout panel, but allows the outer panels to size to their
> "natural" sizes?
>
> What I'm trying to accomplish is a panel with a north and a center. I want
> the North panel to size to the natural height of its contents, and the
> center to take up the remaining space. The top panel can change in size,
> and I would like the bottom panel to automatically resize when that happens.
>
>
> Is there a panel that can do something like "Given two widgets, lay the
> first one out, and then give all remaining space to the second" ? Kind of
> an auto-adjusting SplitLayoutPanel.
>
> My other thought was to use a standard DockLayoutPanel or LayoutPanel, but
> somehow attach a listener to the scrollHeight property of the north's
> FlowPanel that triggers a resize of the north layer.
> Does anyone know if there is a way to register for an event that a
> FlowPanel's content's height has changed?
>
> Thanks,
> Eric
>
> --
> 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.
>
--
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.