]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/checkbox.mm
removed old bc++ makefiles
[wxWidgets.git] / src / cocoa / checkbox.mm
index 921a1d3a287c93dc07d97bfec019ccefcfcc8d6a..1dfd1f63314935f20636309167bec24a80af1fec 100644 (file)
@@ -35,8 +35,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
     if(!CreateControl(parent,winid,pos,size,style,validator,name))
         return false;
     m_cocoaNSView = NULL;
-    NSRect cocoaRect = NSMakeRect(10,10,20,20);
-    SetNSButton([[NSButton alloc] initWithFrame: cocoaRect]);
+    SetNSButton([[NSButton alloc] initWithFrame: MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
     [GetNSButton() setButtonType: NSSwitchButton];
     [GetNSButton() setTitle:[NSString stringWithCString: label.c_str()]];
@@ -44,6 +43,8 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid,
 
     if(m_parent)
         m_parent->CocoaAddChild(this);
+    SetInitialFrameRect(pos,size);
+
     return true;
 }