View Full Version : [FNR] TabPanel and VBoxLayoutContainer

18 Nov 2011, 7:19 AM
It seems, like it's not possible to use a VBoxLayoutContainer within a TabPanel:

public void onModuleLoad()
TabPanel tab = new TabPanel();

//ContentPanel f = new ContentPanel(); // --> this one works great
VBoxLayoutContainer f = new VBoxLayoutContainer();
f.add(new Label("Q"));
tab.add(f, "bug");
tab.add(new TextButton("testButton"), "showTestButton");

And that's, how it looks like:
The Label (or any other Widget) is rendered over the whole TabPanel. A ContentPanel doesn't make such problems, but since I am using VBoxLayoutContainer most of the time (automatic strech and flex on last item is just great), I hope this one will get fixed.

21 Nov 2011, 2:37 AM
It seems like the GWT-TabPanel has the same behaviour. It work's fine with a GWT-TabLayoutPanel , but since I prefer the GXT widget, I have to use a ContentPanel wrapper to show my VBoxContainer correctly.

I had no problems with GXT 2.x - but since you're obviously trying to close the gap between GXT and GWT, equal behaviour is the right way to go. My solution shouldn't stay unmentioned though, since I don't think I'm the last person facing this problem.

Colin Alworth
30 Nov 2011, 12:04 PM
Appears to be a bug in VBoxLayoutContainer from that then - adding position:relative to the Label's parent, or parent's parent seems to fix it.

We'll update this thread when a fix is available.

1 Dec 2011, 2:06 PM
This is now fixed in SVN (rev 1934). Change will go out in next release next week.