Don't accept focus for wxRadioBox itself in wxOSX
The radio box is just a static box and so can't have focus, only its child radio buttons should have it. This resolves the problem with getting stuck on wxRadioBox when full keyboard access is off, as wxControlContainer code tried to give focus to wxRadioBox because its AcceptsFocusFromKeyboard() returned true, but none of its radio buttons could be focused without full keyboard access. However this introduces a new problem with wxRadioBox being skipped when full keyboard access is on, which will be fixed in the following commit. See #18089.
This commit is contained in:
@@ -102,6 +102,9 @@ bool wxRadioBox::Create( wxWindow *parent,
|
||||
if ( !wxControl::Create( parent, id, pos, size, style, val, name ) )
|
||||
return false;
|
||||
|
||||
// The radio box itself never accepts focus, only its child buttons do.
|
||||
m_container.DisableSelfFocus();
|
||||
|
||||
// during construction we must keep this at 0, otherwise GetBestSize fails
|
||||
m_noItems = 0;
|
||||
m_noRowsOrCols = majorDim;
|
||||
|
Reference in New Issue
Block a user