X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/525007cf12a3025c2a6ca3c58663062e567c0e25..7d6a4d96961eac84d05db8bb24c64d39003f6e54:/src/cocoa/radiobox.mm diff --git a/src/cocoa/radiobox.mm b/src/cocoa/radiobox.mm index 5ee7d00586..0a8e1aaefb 100644 --- a/src/cocoa/radiobox.mm +++ b/src/cocoa/radiobox.mm @@ -7,7 +7,7 @@ // RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott // (c) 2007 Software 2000 Ltd. -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" @@ -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); @@ -250,7 +255,7 @@ bool wxRadioBox::Show(unsigned int n, bool show) // TODO // NOTE: Cocoa has no visible state for cells so we'd need to replace the // cell with a dummy one to hide it or alternatively subclass NSButtonCell - // and add the behavior. + // and add the behaviour. return false; }