X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c299c3ab663257429983c24e6fb71450f3cf9f1..005f5d1878c1d344e79e3c43b2790332dcea68f3:/src/os2/radiobut.cpp

diff --git a/src/os2/radiobut.cpp b/src/os2/radiobut.cpp
index 8878abed12..83444cd1f0 100644
--- a/src/os2/radiobut.cpp
+++ b/src/os2/radiobut.cpp
@@ -81,6 +81,15 @@ bool wxRadioButton::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;
+
     m_hWnd = (WXHWND)::WinCreateWindow ( GetHwndOf(pParent)
                                         ,WC_BUTTON
                                         ,rsLabel.c_str()