Problem with tabsheet header

Hi,

I have some buttons, On the click listener of these button, I am populating the data in tabs. If there are many buttons, then the tabs will also show correspondingly. My problem is, once the tabs are fitted into the entire width, then the data is populated, but the tabs(or tab headers) are not shown. But the scroll bar for moving to the tabs are there. My requirement is to show the tab header of the selected tab too. Please view my screen shot below.
12539.png

There isn’t a method for scrolling the tabs programmatically, but you can try using setSelectedTab or adding the tab in the beginning of the row with addTab(Component, int).

Thank You, Mr. Thomas Mattsson for your reply. But that did not help! :frowning:
The data under the tab is showing correct, but cant view the tab(header). It goes beyond the scope of the width of the panel.

Then I’m out of ideas… anyone else?

Unfortunately, this behavior is not offered by the default implementation of TabSheet.
What you need to do is override VTabsheet.TabBar.selectTab(int index) with code similar to the scroller code in VTabsheet.onBrowserEvent(Event event). What the scroller code does when the next tab button is clicked is it sets the first visible tab to invisible in order to show the next one. Your code would have to calculate what the first visible tab should be for any arbitrary tab and then set all tabs before the calculated first visible tab invisible before it makes the arbitrary tab visible. Its a little involved.

– Sandile

You could
create an enhancement request
for support for this feature.
That way, it could be considered in the future whereas anything that is only on the forum will get forgotten.

Hi Henri,

Thank you for the suggestion. I have created a ticket. Hope I can expect a break through soon!!!