I've got a GWT TabPanel with width=400, it contains a SmartClient VStack in a tab. That VStack is set to 100% width. I'd expect 100% to be 100% of it's containing component (i.e. 400px), but it appears to be 100% of the entire browser screen width.
In this example, you can see how the first tab is pushed out to an excessive width by the VStack inside it. If you switch to the second tab (which only contains a native GWT HTML component) the width is 500 pixels as expected.
Suprisingly, if we the VStack width to 1, same issue. I dug in with FireBug - it's setting the VStack DIV to have an inline style 'width: 1379px' (or however wide the browser window is) when I would have expected 'width: 1px' or 'width: 100%'.
In this example, you can see how the first tab is pushed out to an excessive width by the VStack inside it. If you switch to the second tab (which only contains a native GWT HTML component) the width is 500 pixels as expected.
Suprisingly, if we the VStack width to 1, same issue. I dug in with FireBug - it's setting the VStack DIV to have an inline style 'width: 1379px' (or however wide the browser window is) when I would have expected 'width: 1px' or 'width: 100%'.
Code:
public void onModuleLoad() { DecoratedTabPanel tabPanel = new DecoratedTabPanel(); tabPanel.setWidth("400"); tabPanel.setAnimationEnabled(true); VStack stack = new VStack(10); stack.setWidth100(); tabPanel.add(stack, "My Tab Category"); tabPanel.add(new HTML("foo"), "My Other Tab"); tabPanel.selectTab(0); RootPanel.get().add(tabPanel); }
Comment