]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/checkbox.cpp
added url of Fink Unix to Mac OS X porting instructions
[wxWidgets.git] / src / os2 / checkbox.cpp
index 0101e79a0c355a3cf9a4f0f6b650b925329af4b9..e2b20ca4d74bbafe047d7b525e1a7a179f252555 100644 (file)
@@ -15,6 +15,9 @@
 #ifndef WX_PRECOMP
     #include "wx/checkbox.h"
     #include "wx/brush.h"
+    #include "wx/scrolwin.h"
+    #include "wx/dcscreen.h"
+    #include "wx/settings.h"
 #endif
 
 #include "wx/os2/private.h"
@@ -94,15 +97,6 @@ bool wxCheckBox::Create(
     if (lStyle & wxCLIP_SIBLINGS )
         lSstyle |= WS_CLIPSIBLINGS;
 
-    //
-    // If the parent is a scrolled window the controls must
-    // have this style or they will overlap the scrollbars
-    //
-    if (pParent)
-        if (pParent->IsKindOf(CLASSINFO(wxScrolledWindow)) ||
-            pParent->IsKindOf(CLASSINFO(wxGenericScrolledWindow)))
-            lSstyle |= WS_CLIPSIBLINGS;
-
     m_hWnd = (WXHWND)::WinCreateWindow ( GetHwndOf(pParent)
                                         ,WC_BUTTON
                                         ,rsLabel.c_str()
@@ -128,13 +122,18 @@ bool wxCheckBox::Create(
                       ,(PVOID)&lColor
                      );
 
-    SetFont(pParent->GetFont());
-
+    wxFont*                          pTextFont = new wxFont( 10
+                                                            ,wxMODERN
+                                                            ,wxNORMAL
+                                                            ,wxNORMAL
+                                                           );
+    SetFont(*pTextFont);
     SetSize( nX
             ,nY
             ,nWidth
             ,nHeight
            );
+    delete pTextFont;
     return TRUE;
 } // end of wxCheckBox::Create
 
@@ -153,7 +152,7 @@ wxSize wxCheckBox::DoGetBestSize() const
     {
         wxScreenDC                  vDc;
 
-        vDc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT));
+        vDc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
         //
         // The height of a standard button in the dialog units is 8,