]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/button.cpp
cleaning up strdup/isascii definitions for compilers which lack them (should fix...
[wxWidgets.git] / src / univ / button.cpp
index 821843ff1cf31429a32638493e7b44594465bfbb..613ff0c3d77f0a106b053b310399e9ff1124ac46 100644 (file)
@@ -41,6 +41,7 @@
 #include "wx/univ/inphand.h"
 #include "wx/univ/theme.h"
 #include "wx/univ/colschem.h"
+#include "wx/stockitem.h"
 
 // ----------------------------------------------------------------------------
 // constants
@@ -69,13 +70,17 @@ void wxButton::Init()
 bool wxButton::Create(wxWindow *parent,
                       wxWindowID id,
                       const wxBitmap& bitmap,
-                      const wxString &label,
+                      const wxString &lbl,
                       const wxPoint &pos,
                       const wxSize &size,
                       long style,
                       const wxValidator& validator,
                       const wxString &name)
 {
+    wxString label(lbl);
+    if (label.empty() && wxIsStockID(id))
+        label = wxGetStockLabel(id);
+
     // center label by default
     if ( !(style & wxALIGN_MASK) )
     {