]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/checkbox.mm
minor fixes; replace references to Windows95 with references to wxMSW where possible
[wxWidgets.git] / src / osx / cocoa / checkbox.mm
index 47962106a394f7cd5754642c1e2397d211bfe3d7..8e79189ed1eef16421a4a733b0553bfad09dbe80 100644 (file)
@@ -25,17 +25,13 @@ wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStyle) 
 {
-    NSView* sv = (wxpeer->GetParent()->GetHandle() );
-    
-    NSRect r = wxToNSRect( sv, wxRect( pos, size) );
-    // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ;
+    NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
 
     [v setButtonType:NSSwitchButton];    
     if (style & wxCHK_3STATE)
         [v setAllowsMixedState:YES];
         
-    [sv addSubview:v];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     [v setImplementation:c];
     return c;