X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/da0634c1401743089b1d8be20f9b6bdad0e8085b..5974c3cf0664c2db575ee956a731a0ae7c96d074:/src/cocoa/radiobox.mm diff --git a/src/cocoa/radiobox.mm b/src/cocoa/radiobox.mm index 71b8994bad..ff0626e5c5 100644 --- a/src/cocoa/radiobox.mm +++ b/src/cocoa/radiobox.mm @@ -9,8 +9,13 @@ // Licence: wxWindows license ///////////////////////////////////////////////////////////////////////////// -#include "wx/app.h" -#include "wx/radiobox.h" +#include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/radiobox.h" +#endif //WX_PRECOMP + +#import IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl) BEGIN_EVENT_TABLE(wxRadioBox, wxControl) @@ -28,15 +33,17 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID winid, { if(!CreateControl(parent,winid,pos,size,style,validator,name)) return false; - m_cocoaNSView = NULL; + SetNSView([[NSView alloc] initWithFrame: MakeDefaultNSRect(size)]); + [m_cocoaNSView release]; if(m_parent) m_parent->CocoaAddChild(this); + SetInitialFrameRect(pos,size); + return true; } wxRadioBox::~wxRadioBox() { - CocoaRemoveFromParent(); } // selection