I have a screen in which a number of tabs in the tabsheet are optional. It is even possible that only one tab is left visible. In this case, it would be very nice if the tabs would not be visible at all.
I can imagine that I could set styling to the tabsheet that would hide the tab but is there any other way to do such a thing? Thanks for any ideas.
-b
// Check number of tabs visible. If only one, hide tab container alltogether
int i =0;
for (TabSheet.Tab t : tabs.getTabs()) {
if (t.isVisible())
i += 1;
}
if (i == 1)
tabs.setStyleName("hide-tabs");
And styling:
.hide-tabs {
margin-top: -12px; /* assumes the top margin is set for the visible tab */
.v-tabsheet-tabcontainer {
display: none;
}
}