TabSheet setSizeUndefined not work

Hello,

if I do the following:

TabSheet testTabSheet = new TabSheet();
testTabSheet.setSizeUndefined();
addComponent(testTabSheet);

it doesn’t have any effekt. For me it is a bug or is there any thing I must do that vaadin don’t calculate the size of the tabsheet? We will make it with css.

Greetings
Torsten

Calling setSizeUndefined doesn’t mean no inline size wouldn’t be specified on the client side. It just means that the component will be just as big so it fits all of the contained components inside it.

The client side size calculations require the use of fixed inline styles in many cases, so probably your only option is to use !important in your CSS to override the inline styles. Not pretty, but works.

Yes, it will work - but there is a problem: Vaadin (or GWT?) creates a div without id and without class. So the only way to set the width with css is


.v-tabsheet-tabsheetpanel div {
    width: auto !important;
}

And now I’m not able to set the width of any child.

Another problem is, if I use setWidth on TabSheet, the Tabs aren’t use the full size. why?

Greetings
Torsten

It’s the Vaadin VTabsheet widget that creates the extra anonymous div. You can target that specific element using the direct child selector, but that doesn’t work in IE6:

.v-tabsheet-tabsheetpanel > div {
   width: auto !important;
   }

This won’t propagate to the other components inside the tabsheet.

What do you mean exactly? The tabs on the tabbar don’t use full size, or the contents inside the tabsheet content are don’t use full size? The latter you can control simply applying setSizeFull to the components you place inside the TabSheet.