X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7993e67c758d0321c3bf2a6cab2ee16c42c73eab..8f4fcc4ee080b020057cc028a809ffc884f63bb8:/src/os2/stattext.cpp diff --git a/src/os2/stattext.cpp b/src/os2/stattext.cpp index fbeefc707f..8719214241 100644 --- a/src/os2/stattext.cpp +++ b/src/os2/stattext.cpp @@ -20,6 +20,7 @@ #include "wx/event.h" #include "wx/app.h" #include "wx/brush.h" +#include "wx/scrolwin.h" #endif #include "wx/stattext.h" @@ -66,6 +67,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 @@ -100,7 +110,7 @@ bool wxStaticText::Create( ); SubclassWin(m_hWnd); - wxControl::SetFont(pParent->GetFont()); + wxControl::SetFont(*wxSMALL_FONT); SetSize( nX ,nY ,nWidth @@ -232,5 +242,3 @@ MRESULT wxStaticText::OS2WindowProc( ,lParam ); } // end of wxStaticText::OS2WindowProc - -