]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/stattext.cpp
wxFileCtrl::Update was hiding wxWindow::Update
[wxWidgets.git] / src / os2 / stattext.cpp
index fbeefc707fe1a3ab8f959c3dd274c5ee962b49ec..871921424161b0a23dd6521ec26fbc713e0c8e41 100644 (file)
@@ -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
-
-