]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/radiobox.mm
Use setAutoresizingMask: NSViewMinYMargin to keep subviews in the same
[wxWidgets.git] / src / cocoa / radiobox.mm
index 71b8994bad8f880546692d5e7db85a258442664d..37cffde012cd28d18ab0a1f61480038e8be19f9d 100644 (file)
@@ -12,6 +12,8 @@
 #include "wx/app.h"
 #include "wx/radiobox.h"
 
+#import <AppKit/NSView.h>
+
 IMPLEMENT_DYNAMIC_CLASS(wxRadioBox, wxControl)
 BEGIN_EVENT_TABLE(wxRadioBox, wxControl)
 END_EVENT_TABLE()
@@ -28,15 +30,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