I can’t find any method for making a tab invisible or otherwise hidden in an SWT/JFace application — I want a second tab to be available (or not) based on some other preferences set by the user.
It shouldn’t be so hard to figure this out!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only way that I know of is to dispose the CTabItem for the tab you want to hide and then create a new CTabItem when you want to show it. Sort of,
If you want to hide a tab in the middle you’ll need to recreate all the tabs after the one you disposed.. It’s probably easiest if you create a class that holds the control and a field that can be used to toggle the visibility. Then you can just dipose all the CTabItems and recreate iff the visibility field is true.