X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8a3f66ca7773885b7d396b86e49457abfccd6a9..91b4bd63177025704dd39679a2a7c4198eeb7909:/src/os2/spinbutt.cpp diff --git a/src/os2/spinbutt.cpp b/src/os2/spinbutt.cpp index 7c9774ede3..720b9d0f1e 100644 --- a/src/os2/spinbutt.cpp +++ b/src/os2/spinbutt.cpp @@ -102,6 +102,15 @@ bool wxSpinButton::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); @@ -132,7 +141,7 @@ bool wxSpinButton::Create( ::WinQueryWindowPos(m_hWnd, &vSwp); SetXComp(vSwp.x); SetYComp(vSwp.y); - SetFont(pParent->GetFont()); + SetFont(*wxSMALL_FONT); // // For OS/2 we want to hide the text portion so we can substitute an // independent text ctrl in its place. 10 device units does this