X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8a3f66ca7773885b7d396b86e49457abfccd6a9..91b4bd63177025704dd39679a2a7c4198eeb7909:/src/os2/spinctrl.cpp diff --git a/src/os2/spinctrl.cpp b/src/os2/spinctrl.cpp index 516ee8f9cb..bfda23f725 100644 --- a/src/os2/spinctrl.cpp +++ b/src/os2/spinctrl.cpp @@ -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);