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.

Reply via email to