>  1. Widgets that adjust themselves depending on the size of neighbour
> widgets. Some widgets have their size fixed decided in CSS styles, the
> other ones adjust depending on this size in the onload()

Widgets given fixed sizes in CSS/code should appear correctly when tab
selected. Is there a reason why you cannot size the remaining
relatively sized widgets in percentage terms? So long as they are told
to fill up available space (or proportion of it) they should do so
when tab selected. That's the way it's expected to work.

In general I think one should avoid calculating sizes manually in code
like the plague - use percentages and leave it to the browser
otherwise you will go mad. AFAIK the only common situation you can't
do that is with ScrollPanels which must be given a fixed height in
pixels to kick in properly.

>  2. widgets like the incubator PagingScrollTable that have internal
> components that compute their size. For example
>
>     (in com.google.gwt.widgetideas.table.client.ScrollTable)
>     int totalHeight = DOM.getElementPropertyInt(getElement(),
> "clientHeight");
>     int headerHeight = headerTable.getOffsetHeight();
>     int footerHeight = 0;
>     if (footerTable != null) {
>       footerHeight = footerTable.getOffsetHeight();
>     }
>     DOM.setStyleAttribute(headerWrapper, "height", headerHeight +
> "px");
>     if (footerWrapper != null) {
>       DOM.setStyleAttribute(footerWrapper, "height", footerHeight +
> "px");
>     }
>     DOM.setStyleAttribute(dataWrapper, "height",
>         (totalHeight - headerHeight - footerHeight) + "px");

I'm not sure how PagingScrollTable works in TabPanels. Have you tried
setting it to size(100%,100%) and proved it does not behave properly
when it's tab is selected? I would be surprised if it didn't as that
would be an obvious flaw.

On Mar 2, 1:20 pm, LEDUQUE Mickaël <mledu...@gmail.com> wrote:
> Well, there are multiple case here :
>  1. Widgets that adjust themselves depending on the size of neighbour
> widgets. Some widgets have their size fixed decided in CSS styles, the
> other ones adjust depending on this size in the onload()
>  2. widgets like the incubator PagingScrollTable that have internal
> components that compute their size. For example
>
>     (in com.google.gwt.widgetideas.table.client.ScrollTable)
>     int totalHeight = DOM.getElementPropertyInt(getElement(),
> "clientHeight");
>     int headerHeight = headerTable.getOffsetHeight();
>     int footerHeight = 0;
>     if (footerTable != null) {
>       footerHeight = footerTable.getOffsetHeight();
>     }
>     DOM.setStyleAttribute(headerWrapper, "height", headerHeight +
> "px");
>     if (footerWrapper != null) {
>       DOM.setStyleAttribute(footerWrapper, "height", footerHeight +
> "px");
>     }
>     DOM.setStyleAttribute(dataWrapper, "height",
>         (totalHeight - headerHeight - footerHeight) + "px");
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to