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

Bug 203448

Summary: root-level radio buttons excluded from Tab order
Product: [Eclipse Project] Platform Reporter: Grant Gayed <grant_gayed>
Component: SWTAssignee: Steve Northover <snorthov>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: keith.chong.ca, snorthov
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard: stalebug

Description Grant Gayed CLA 2007-09-14 11:16:34 EDT
- run the snippet below
- press Tab a few times and note:
  -> initial focus seems to have been on the "radio 1" in Group 0, not the Shell's "radio 1"
  -> from Group 3 focus goes to the second Group 0, not the second "radio 1" at the Shell's level

public static void main(String[] args) {
	Display display = new Display();
	Shell shell = new Shell(display);
	shell.setLayout(new GridLayout());
	for (int j = 0; j < 2; j++) {
		Composite composite = shell;
		for (int i = 0; i < 5; i++) {
			new Button (composite, SWT.RADIO).setText("radio 1");
			new Button (composite, SWT.RADIO).setText("radio 2");
			Group group = new Group(composite, SWT.NONE);
			group.setLayout(new GridLayout());
			composite = group;
			group.setText("Group " + i);
		}
	}
	shell.pack();
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) display.sleep();
	}
	display.dispose();
}
Comment 1 Steve Northover CLA 2007-09-17 11:21:25 EDT
Is this new?
Comment 2 Grant Gayed CLA 2007-09-17 12:10:41 EDT
It happens in 3.3 as well.
Comment 3 Keith Chong CLA 2009-03-26 15:15:36 EDT
I'm encountering a similar problem with Text controls with radio buttons.

ie. add:

new Text(composite, SWT.READ_ONLY).setText("Test");

just before creating the "radio 1" button.   Then rerun.

--> you will see that as you 'tab' over, the radio1 button gets focus first, and then the Text field.


Comment 4 Keith Chong CLA 2009-03-26 15:19:52 EDT
Correction, similar problem, in that the order is wrong.  The root radio buttons will eventually get focus as you continue to press tab.   (However, the root Text will initially get selected once the shell appears).
Comment 5 Keith Chong CLA 2009-03-26 15:27:46 EDT
*** Bug 269089 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Webmaster CLA 2019-09-06 15:34:50 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 7 Eclipse Genie CLA 2022-01-29 16:39:30 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.