X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7993e67c758d0321c3bf2a6cab2ee16c42c73eab..8af27d1dee477e3e52aa60d73b19d46f531374b7:/src/os2/stattext.cpp?ds=inline diff --git a/src/os2/stattext.cpp b/src/os2/stattext.cpp index fbeefc707f..5b214b0987 100644 --- a/src/os2/stattext.cpp +++ b/src/os2/stattext.cpp @@ -66,6 +66,15 @@ bool wxStaticText::Create( lSstyle |= DT_RIGHT; else lSstyle |= DT_LEFT; + // + // 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( (HWND)GetHwndOf(pParent) // Parent window handle ,WC_STATIC // Window class ,(PSZ)rsLabel.c_str() // Initial Text