Reputation: 2042
I have created a TabPanel
in GWT and add tabs
Now I want to get the selected tab so that if a user clicks on a close button, I can close that selected tab.
Here is my tabpanel code:
TabPanel tabPanelCvs =new TabPanel();
tabPanelCvs.setVisible(true);
tabPanelCvs.setSize("900","800");
VerticalPanel vpnlCvsTab = new VerticalPanel();
tabPanelCvs.add(vpnlCvsTab,result.getResumeTitle());
Any idea how can I get the selected tab of my TabPanel
?
Upvotes: 4
Views: 5746
Reputation: 16109
For getting selected tab of TabPanel
there is method: TabBar#getSelectedTab()
int selectedIndex = tabPanel.getTabBar().getSelectedTab();
Upvotes: 9