X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/987da0d4116e93c1d326b29272c28ee9f989b87c..81039e0de1c693128da186c8054052db8eeb853e:/src/os2/button.cpp diff --git a/src/os2/button.cpp b/src/os2/button.cpp index 3c1331876b..b4ce9ac0d5 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -70,6 +70,15 @@ bool wxButton::Create( // if (m_windowStyle & wxCLIP_SIBLINGS ) lStyle |= 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))) + lStyle |= WS_CLIPSIBLINGS; + m_hWnd = (WXHWND)::WinCreateWindow( GetHwndOf(pParent) // Parent handle ,WC_BUTTON // A Button class window ,(PSZ)rsLabel.c_str() // Button text @@ -170,7 +179,7 @@ wxSize wxButton::GetDefaultSize() { wxScreenDC vDc; - vDc.SetFont(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + vDc.SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); // // The size of a standard button in the dialog units is 50x14,