AFAICT, the problem of TabPanel is that it's based on a VerticalPanel with 
a (customized) TabBar on the upper cell and a (customized) DeckPanel on the 
lower cell; and the TabBar is given a width of 100% and the cell containing 
the DeckPanel a height of 100%. This is what's likely to break in standards 
mode (note: it's only about the rendering).

BTW, TabBar has a similar problem (even though it's not documented).

But well, the problem is mostly (if not uniquely) about the rendering, so 
I'd say try it and if it works for you, then keep it. Otherwise roll your 
own (the old KitchenSink sample used to have its own implementation of a 
tab panel).

As a workaround, maybe you could use a TabLayoutPanel with empty tabs to 
work as a "tab bar", and a separate DeckPanel? (note: the TabLayoutPanel's 
tab bar is simply a FlowPanel, and each tab is a SimplePanel with 
a CommonResources.getInlineBlockStyle() style and a ClickHandler)

On Friday, September 6, 2013 1:10:16 PM UTC+2, stuckagain wrote:
>
> Hi,
>
> I'm in the middle of moving from QuirksMode to Standards mode. And I am 
> having an issue to emulate the old TabPanel with TabLayoutPanel.
>
> What I need is a TabLayoutPanel that resizes depending on the tab 
> contents. The original TabPanel had that behaviour, 
> but the TabLayoutPanel needs a fixed size.
>
> I found this thread in stackoverflow: 
> http://stackoverflow.com/questions/5170324/tablayoutpanel-dynamic-resizing
>
> But I don't really like the proposed solution(s).
>
> 1) DecoratedTabPanel or TabPanel are not supposed to be used in standards 
> mode (javadoc of TabPanel says so).
> 2) hacking the TabLayoutPanel element styles is a bit messy since that is 
> playing with the internals of the Widget.
>
> Any idea on how to implement this behaviour in a post QuirksMode 
> environment, without risk of breaking when 2.6 or 3.0 
> comes out ? I could create my own tabpanel implementation, but this seems 
> such a basic requirement. With old GWT quirksmode I 
> actually had to fight to get the opposite effect with the tabpanel.
>
> David
>

-- 
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