X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..d4052bcb78b0ba58ec357b47faa15c92465def20:/src/os2/button.cpp diff --git a/src/os2/button.cpp b/src/os2/button.cpp index 150685d88e..05a44eb6cc 100644 --- a/src/os2/button.cpp +++ b/src/os2/button.cpp @@ -6,7 +6,7 @@ // Created: 10/13/99 // RCS-ID: $Id$ // Copyright: (c) David Webster -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx.h". @@ -23,6 +23,7 @@ #include "wx/scrolwin.h" #endif +#include "wx/stockitem.h" #include "wx/os2/private.h" #define BUTTON_HEIGHT_FROM_CHAR_HEIGHT(cy) (11*EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy)/10) @@ -43,7 +44,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl) bool wxButton::Create( wxWindow* pParent , wxWindowID vId -, const wxString& rsLabel +, const wxString& rsLbl , const wxPoint& rPos , const wxSize& rSize , long lStyle @@ -51,6 +52,9 @@ bool wxButton::Create( , const wxString& rsName ) { + wxString rsLabel(rsLbl); + if (rsLabel.empty() && wxIsStockID(vId)) + rsLabel = wxGetStockLabel(vId); wxString sLabel = ::wxPMTextToLabel(rsLabel);