]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/button.cpp
Added OnDragOver returning wxDragCopy so text can be dropped from IE 6.
[wxWidgets.git] / src / os2 / button.cpp
index 3c1331876b77c6abaa1acbe248ab7c7cddc7e8ba..83301398f7ffbed054116a2f22aa8c8130004fe8 100644 (file)
@@ -19,6 +19,7 @@
     #include "wx/bmpbuttn.h"
     #include "wx/settings.h"
     #include "wx/dcscreen.h"
+    #include "wx/scrolwin.h"
 #endif
 
 #include "wx/os2/private.h"
@@ -70,6 +71,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 +180,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,