Reputation: 446
I am using GXT3 version. I have a screen with tabs where on the first tab I have add button which opens new tab where I do certain functions. After done I need to close the newly opened tab on click of close button which I am not able to do.
To add the new tab I am doing this
tabPanel.add(childPanel, new TabItemConfig("some title"));
where childPanel is a verticalLayoutContainer widget of another class. The close button is in this another class.
How can I remove this new tab?
Upvotes: 0
Views: 354
Reputation: 33
if I understood your problem, in gxt3 you need pass in the config if your new tab can be closed.
TabItemConfig tabItemConfig = new TabItemConfig("Some Title");
tabItemConfig.setClosable(true);
tabPanel.add(childPanel, tabItemConfig);
So the new tab has a close button.
Upvotes: 2