Thomas,

But reality is a bit different, the layout panels are actively changing
widget sizes, except the HeaderPanel.
Additionally the forceLayout is a private method in this Layout widget, not
that it matters to me in this case.

But Ok, I have a workaround in that I set the pixel size myself. I created
a subclass of HeaderPanel that wraps the content widget in a custom panel
that does a setPixelSize on the child when onResize is triggered. It would
be nice if the HeaderPanel would have this behaviour ( or even support
animation like the other Layout Panels do).

David
On Mon, Aug 19, 2013 at 4:24 PM, Thomas Broyer <t.bro...@gmail.com> wrote:

>
> On Monday, August 19, 2013 4:06:07 PM UTC+2, stuckagain wrote:
>>
>> Hi,
>>
>> I am trying to use the HeaderPanel to set a Header/Footer and an resizing
>> ContentPanel (which contains a CellTable).
>>
>> The problem is that unlike other LayoutPanel classes the vertical size is
>> not enforced on the content widget, its width is set to 100% but the height
>> is not set.
>> I don't really want to set width/height to 100% either since that would
>> make it impossible to have a scrollbar.
>>
>> Right now I have a solution in that I override the onResize method of the
>> widget that gets inserted as the content panel.
>> But that is not really nice in a framework where I have lots of reusable
>> widgets, and I don't know which will be inserted in a HeaderPanel or not.
>>
>> Any reason why this Layout Panel is not enforcing the height and width in
>> pixels like other layout panels do on their children ?
>>
>
> There's a reason for RequiresResize to have an onResize method rather than
> relying on setSize. One of the goals (expectations? dreams?) of layout
> panels was that the layout could be done in pure CSS (including animations)
> and you'd only need to notify widgets when their size has changed (through
> onResize), something that you know when it happens because the layout is
> controlled from the outside in (it should only happen the top layout panel
> is resized, or some panels' inner layout change, or possibly when font
> sizes or zoom change; there's the case of borders and margins but you're
> supposed to know what you're doing so you could call onResize or
> forceLayout then).
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to