]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/button.cpp
define WM_CONTEXTMENU if the standard headers don't
[wxWidgets.git] / src / motif / button.cpp
index a1afbd74be9c620718f22689b541896c25959471..93189fd2a7199b67038e5475b7762e258bb78612 100644 (file)
@@ -33,6 +33,7 @@
 #pragma message enable nosimpint
 #endif
 
 #pragma message enable nosimpint
 #endif
 
+#include "wx/stockitem.h"
 #include "wx/motif/private.h"
 #include "wx/sysopt.h"
 
 #include "wx/motif/private.h"
 #include "wx/sysopt.h"
 
@@ -45,12 +46,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
 
 // Button
 
 
 // Button
 
-bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
+bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& lbl,
                       const wxPoint& pos,
                       const wxSize& size, long style,
                       const wxValidator& validator,
                       const wxString& name)
 {
                       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);
+    
     if( !CreateControl( parent, id, pos, size, style, validator, name ) )
         return false;
 
     if( !CreateControl( parent, id, pos, size, style, validator, name ) )
         return false;