Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324048

Summary: Tab traversal of radio buttons has wrong order
Product: [Eclipse Project] Platform Reporter: Elias Volanakis <elias>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Snippet none

Description Elias Volanakis CLA 2010-08-30 23:18:37 EDT
To reproduce:

1. launch attached snippet
2. press tab several times

The tab order is out of order: text, check A, check B, radio A (!)

Expected: tab order same as widget order: text, radio A, check A, check B

Workaround: resetting the tab oder via  parent.setTabList( new Control[] { ... } )  works around the problem.
Comment 1 Elias Volanakis CLA 2010-08-30 23:20:34 EDT
Created attachment 177800 [details]
Snippet
Comment 2 Felipe Heidrich CLA 2010-08-31 10:15:30 EDT
Radio buttons are not tab groups (they are tab items).
Tab is used to move the focus from group to group.
Within a tab group use arrow keys to move the focus from tab item to tab item.

This behaviour was design based on the default platform behaviour of Windows and it is consistent across all our platforms. I can not change this. Sorry.

Another way to fix is:

	final Composite parent = new Composite(shell, SWT.NONE);
	parent.setLayout(new GridLayout(6, true));

	new Text(parent, SWT.BORDER);
	Composite parent2 = new Composite(parent, SWT.BORDER);
	parent2.setLayout(new FillLayout());
	new Button(parent2, SWT.RADIO).setText("RadioA");
	new Button(parent2, SWT.RADIO).setText("RadioB");
	new Button(parent, SWT.CHECK).setText("CheckA");
	new Button(parent, SWT.CHECK).setText("CheckB");
	
(this way it is more explicity that you have a tab group containing both radio groups).

closing as wont fix.
Comment 3 Elias Volanakis CLA 2010-08-31 12:54:17 EDT
Ok, thanks for the info. 

Elias.