X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d8a3f66ca7773885b7d396b86e49457abfccd6a9..91b4bd63177025704dd39679a2a7c4198eeb7909:/src/os2/gauge.cpp diff --git a/src/os2/gauge.cpp b/src/os2/gauge.cpp index c1fe612f6c..b7700f4147 100644 --- a/src/os2/gauge.cpp +++ b/src/os2/gauge.cpp @@ -14,6 +14,7 @@ #ifndef WX_PRECOMP #include "wx/defs.h" #include "wx/utils.h" +#include "wx/scrolwin.h" #endif #include "wx/os2/private.h" @@ -155,7 +156,14 @@ bool wxGauge::Create( if (m_windowStyle & wxCLIP_SIBLINGS) lMsStyle |= 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))) + lMsStyle |= WS_CLIPSIBLINGS; m_hWnd = (WXHWND)::WinCreateWindow( (HWND)GetHwndOf(pParent) // Parent window handle ,WC_ENTRYFIELD // Window class