X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0093fe11c5f581abbc37447b191903e871112f46..ae177b45b258b4985ee8c9ce7848bcb4f1266f80:/src/os2/control.cpp?ds=sidebyside diff --git a/src/os2/control.cpp b/src/os2/control.cpp index 324ea885b2..df264fae88 100644 --- a/src/os2/control.cpp +++ b/src/os2/control.cpp @@ -108,7 +108,7 @@ bool wxControl::OS2CreateControl( (void) OS2GetStyle(GetWindowStyle(), &dwExstyle); } // - // All controls should have these styles (wxWindows creates all controls + // All controls should have these styles (wxWidgets creates all controls // visible by default) // if (m_isShown ) @@ -161,9 +161,14 @@ bool wxControl::OS2CreateControl( SubclassWin(m_hWnd); // - // Controls use the same font and colours as their parent dialog by default + // Controls use the same colours as their parent dialog by default // InheritAttributes(); + // + // All OS/2 ctrls use the small font + // + SetFont(*wxSMALL_FONT); + SetXComp(0); SetYComp(0); SetSize( rPos.x @@ -240,6 +245,15 @@ WXDWORD wxControl::OS2GetStyle( return dwStyle; } // end of wxControl::OS2GetStyle +void wxControl::SetLabel( + const wxString& rsLabel +) +{ + wxString sLabel = ::wxPMTextToLabel(rsLabel); + + ::WinSetWindowText(GetHwnd(), sLabel.c_str()); +} // end of wxControl::SetLabel + // --------------------------------------------------------------------------- // global functions // --------------------------------------------------------------------------- @@ -270,10 +284,10 @@ void wxFindMaxSize( if (nRight > pRect->xRight) pRect->xRight = nRight; - if (nTop < pRect->yTop) + if (nTop > pRect->yTop) pRect->yTop = nTop; - if (nBottom > pRect->yBottom) + if (nBottom < pRect->yBottom) pRect->yBottom = nBottom; } // end of wxFindMaxSize