The only way I know is to get rid of CTabItem for the tab you want to hide, and then create a new CTabItem when you want to show it. Sorting,
CTabFolder folder = new CTabFolder(parent, SWT.NONE); Label label = new Label(folder, SWT.NONE); label.setText("Hello"); CTabItem item = new CTabItem(folder); item.setControl(label);
If you want to hide the tab in the middle, you will need to recreate all the tabs after you have placed. This is probably the easiest way if you create a class that contains the control and a field that you can use to switch visibility. Then you can simply knock over all CTabItems and recreate if the scope is true.
source share