Tuesday, September 24, 2013

Re: HeaderPanel not setting height of the Content widget

Ahh sorry must have misread.

On Friday, September 6, 2013 8:26:10 AM UTC-4, stuckagain wrote:
Patrick,

No, I don't know the height of the header, and I certainly don't want to set it in pixel sizes in the code either. (I even have the header change height depending on what the user is doing in there).
The question was about the content widget not being resized in a HeaderPanel, not the header that one works really well.

But the tip from Jens fixed it for me. I now enforce relative to the content container and force top,bottom,left,right at 0px. This removes the need for code to do size calculations and the content is resized and onResize is properly called automatically when the browser window resizes.

The only problem I have is that it is a bit a hack on the HeaderPanel, possible breaking in the future. It is not easy to implement a custom LayoutPanel since if you look at the implementation of HeaderPanel it is depending on quite a lot of internals of the Layout classes.


On Friday, September 6, 2013 2:17:24 PM UTC+2, Patrick Tucker wrote:
If you have a set size for your header, you most likely should be using a DockLayoutPanel.  The HeaderPanel should be used when you do not want to restrict your header or footer to a particular size and allow it to be whatever size it ends up being.

--
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+unsubscribe@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.

No comments:

Post a Comment