X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c299c3ab663257429983c24e6fb71450f3cf9f1..8af27d1dee477e3e52aa60d73b19d46f531374b7:/src/os2/spinbutt.cpp diff --git a/src/os2/spinbutt.cpp b/src/os2/spinbutt.cpp index 6e58a26322..55e9b2c6a3 100644 --- a/src/os2/spinbutt.cpp +++ b/src/os2/spinbutt.cpp @@ -61,6 +61,7 @@ bool wxSpinButton::Create( int nY = rPos.y; int nWidth = rSize.x; int nHeight = rSize.y; + SWP vSwp; m_min = 0; m_max = 100; @@ -101,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); @@ -128,6 +138,9 @@ bool wxSpinButton::Create( if(pParent) pParent->AddChild((wxSpinButton *)this); + ::WinQueryWindowPos(m_hWnd, &vSwp); + SetXComp(vSwp.x); + SetYComp(vSwp.y); SetFont(pParent->GetFont()); // // For OS/2 we want to hide the text portion so we can substitute an