Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 83957 - Using setTabList() to exclude controls from tab order.
Summary: Using setTabList() to exclude controls from tab order.
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-28 14:37 EST by Frank Rydzewski CLA
Modified: 2014-04-14 09:00 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Rydzewski CLA 2005-01-28 14:37:18 EST
When I set the tabList for a composite, if I exclude a control from the list, 
once I set focus to that control, I cannot tab off it.

So, if I have 3 button controls:
controlA, controlB, controlC  

I call:
composite.setTabList(new Control[]{controlA, controlB});

If I click on controlC, giving it focus, and then press 'tab', the focus does 
not move from controlC.  So, if I get focus on a control that is not in a 
tabList, there is not way to tab back to the other controls on that composite.

I'm not sure if this is expected behavior or not.
Comment 1 Steve Northover CLA 2005-02-01 11:43:42 EST
If you exclude a control from the tab list, it doesn't take part in tabbing.  
This means that is if focus somehow gets to the control, you won't be able to 
tab out.
Comment 2 Steve Northover CLA 2005-02-01 11:44:03 EST
WONTFOX
Comment 3 Holger Grote CLA 2014-04-14 09:00:45 EDT
I think the problem is in the Control.setTabGroup() method. If I have a tablist defined this method can return true but does not return false if it is not in the tablist. Instead it uses the OS Flag WS_TABSTOP

boolean isTabGroup () {
	Control [] tabList = parent._getTabList ();
	if (tabList != null) {
		for (int i=0; i<tabList.length; i++) {
			if (tabList [i] == this) return true;
		}
		//Add this new line if Tablist ist set
		return false;
	}
	int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);
	return (bits & OS.WS_TABSTOP) != 0;
}