Community
Participate
Working Groups
Build 20011206 - Window / Preferences - the focus is on the first selected radio button in the last group This is because Button.setSelection(boolean) always sets the shell's saved focus if the selection is true. Here, preference pages are created invisibly, then made visible so the saved focus becomes the actual focus. So preference pages with radio buttons will always give focus to the last selected radio button. I will add a workaround to PreferenceDialog to set the focus back to the tree.
Which o/s is this? If it's win32, then there's nothing we can do about it. Calling setSelection on a radio button causes the focus to be set to that widget.
Yes, windows. It's SWT that's setting the remembered focus, not Windows, to work around a Windows bug. It seems the current workaround does not properly handle the case where the widget isn't visible yet. Even if Windows does set it, it would seem the workaround should remember the old focus, then restore it after.
See comments by Nick.
Fixed > 20020212. The new fix is to detect when the saved focus is a radio button that is not selected and restore the focus to the first widget that will take focus instead of the radio button. Note that if the radio button is selected, focus will be restored to it. I hope no one is relying on focus being given to the selected radio item ...