X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/259502c61d563a8f249254a7a559c1268354d4db..74b1f0b45e0f0bc7e25c5f32bb495e3e4bcd3392:/src/cocoa/radiobox.mm diff --git a/src/cocoa/radiobox.mm b/src/cocoa/radiobox.mm index 4319dcfb38..6ce3aa2dd3 100644 --- a/src/cocoa/radiobox.mm +++ b/src/cocoa/radiobox.mm @@ -24,6 +24,7 @@ #include "wx/cocoa/string.h" #include "wx/cocoa/autorelease.h" +#import #include "wx/cocoa/objc/NSView.h" #import #import @@ -95,7 +96,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid, NSMutableArray *allCells = [NSMutableArray arrayWithCapacity:n]; for(int i=0; i 0) + SetSelection(0); + if(m_parent) m_parent->CocoaAddChild(this); @@ -228,7 +234,7 @@ void wxRadioBox::SetString(unsigned int n, const wxString& label) { int r = GetRowForIndex(n); int c = GetColumnForIndex(n); - [[GetNSMatrix() cellAtRow:r column:c] setTitle:wxNSStringWithWxString(wxStripMenuCodes(label, wxStrip_Mnemonics))]; + CocoaSetLabelForObject(label, [GetNSMatrix() cellAtRow:r column:c]); } // change the individual radio button state