]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/spinctrl.cpp
wxFileCtrl::Update was hiding wxWindow::Update
[wxWidgets.git] / src / os2 / spinctrl.cpp
index 516ee8f9cb1c504cb645962971ad2a585dca2b10..bfda23f725af4c6396662ab81fc0fb4fd1069702 100644 (file)
@@ -151,6 +151,15 @@ bool wxSpinCtrl::Create(
     if (m_windowStyle & 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;
+
     SPBCDATA                        vCtrlData;
 
     vCtrlData.cbSize = sizeof(SPBCDATA);
@@ -178,7 +187,7 @@ bool wxSpinCtrl::Create(
     m_hWndBuddy = m_hWnd; // One in the same for OS/2
     if(pParent)
         pParent->AddChild((wxSpinButton *)this);
-    SetFont(pParent->GetFont());
+    SetFont(*wxSMALL_FONT);
     ::WinQueryWindowPos(m_hWnd, &vSwp);
     SetXComp(vSwp.x);
     SetYComp(vSwp.y);