]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/button.mm
Fixed menu creation in eVC3
[wxWidgets.git] / src / cocoa / button.mm
index 093bc3fcf5eff66fc45d5f219326963793c9a22d..7b93013217cb15932c6238b39e7a38406a41fb49 100644 (file)
@@ -43,7 +43,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
     [m_cocoaNSView release];
 
     [GetNSButton() setBezelStyle:NSRoundedBezelStyle];
-    [GetNSButton() setTitle:wxNSStringWithWxString(label)];
+    [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
     [GetNSControl() sizeToFit];
 
     if(m_parent)
@@ -73,7 +73,7 @@ wxString wxButton::GetLabel() const
 
 void wxButton::SetLabel(const wxString& label)
 {
-    [GetNSButton() setTitle:wxNSStringWithWxString(label)];
+    [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
 }
 
 wxSize wxButtonBase::GetDefaultSize()