X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/525007cf12a3025c2a6ca3c58663062e567c0e25..ff9f352689a93e0fc01ee20cebe08d6fbfe4b458:/src/cocoa/radiobox.mm?ds=sidebyside diff --git a/src/cocoa/radiobox.mm b/src/cocoa/radiobox.mm index 5ee7d00586..6ce3aa2dd3 100644 --- a/src/cocoa/radiobox.mm +++ b/src/cocoa/radiobox.mm @@ -167,6 +167,11 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid, SetMajorDim(majorDim, style); + // Set the selection to the first item if we have any items. + // This is for parity with other wx ports which do the same thing. + if(n > 0) + SetSelection(0); + if(m_parent) m_parent->CocoaAddChild(this);