Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 12791 - Feature request: ability to disable a TabItem
Summary: Feature request: ability to disable a TabItem
Status: RESOLVED DUPLICATE of bug 75050
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: Other other
: P4 enhancement with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-04 10:22 EST by Joe Szurszewski CLA
Modified: 2010-04-26 01:03 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Szurszewski CLA 2002-04-04 10:22:12 EST
It would be very handy (I have two use cases right now) if it were possible to disable a TabItem in a 
TabFolder.  This would mean that the text on the tab would be grayed out, and the user could not make a 
disabled tab the active tab by clicking on it.  The API could just be 'TabItem.isEnabled()' and 
'TabItem.setEnabled(boolean)'.
Comment 1 Mike Wilson CLA 2002-04-05 08:32:22 EST
.
Comment 2 Veronika Irvine CLA 2002-05-27 09:26:08 EDT
Will look at this after R2.0.
Comment 3 Veronika Irvine CLA 2002-09-10 10:28:49 EDT
Post 2.0. Re-opening bug reports for review.
Comment 4 Bernhard Gruber CLA 2004-08-20 07:44:21 EDT
I would need the ability to disable TabItems, too.
Is there any special reason why this request is open for so long time?
It would be nice if it can be implemented in the near future.
 
Comment 5 Steve Northover CLA 2004-09-27 14:18:45 EDT

*** This bug has been marked as a duplicate of 75050 ***
Comment 6 Mohsen Saboorian CLA 2008-07-31 22:24:36 EDT
(In reply to comment #5)
> 
> *** This bug has been marked as a duplicate of 75050 ***

This doesn't seem to be duplicate for Bug 75050. Can you please re-open it?
Comment 7 Darryl Miles CLA 2010-04-26 01:03:26 EDT
Bug #75050 is the use case for:

tabItem.setVisible(true);
tabItem.setEnabled(false);  // Greys the tab making it unclickable


Bug #12791 is the use case for:

tabItem.setVisible(false);  // Removes the tab from view and shuffles up



Swing appears to have API along the lines of:

http://java.sun.com/docs/books/tutorial/uiswing/components/tabbedpane.html

javax.swing.JTabbedPane#setVisible(...)
javax.swing.JTabbedPane#setEnabled(...)

In relation to this SWT appears to be also missing API for dynamic insertion/removal of TabItems:

javax.swing.JTabbedPane#insertTab(...)
javax.swing.JTabbedPane#addTab(...)
javax.swing.JTabbedPane#remove(...)
javax.swing.JTabbedPane#removeAll(...)