]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/button.mm
add wx/univ/tglbtn.h to wxUniv headers
[wxWidgets.git] / src / cocoa / button.mm
index 63ec84d6023c70a8781cfa13f8989fe2c56b32de..2e9cb7103c139e88c1d138678b3345833d1637c2 100644 (file)
@@ -11,8 +11,9 @@
 
 #include "wx/wxprec.h"
 
+#include "wx/button.h"
+
 #ifndef WX_PRECOMP
-    #include "wx/button.h"
     #include "wx/log.h"
 #endif
 
@@ -47,7 +48,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID winid,
     [m_cocoaNSView release];
 
     [GetNSButton() setBezelStyle:NSRoundedBezelStyle];
-    [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
+    [GetNSButton() setTitle:wxNSStringWithWxString(GetLabelText(label))];
     [GetNSControl() sizeToFit];
 
     if(m_parent)
@@ -77,7 +78,7 @@ wxString wxButton::GetLabel() const
 
 void wxButton::SetLabel(const wxString& label)
 {
-    [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))];
+    [GetNSButton() setTitle:wxNSStringWithWxString(GetLabelText(label))];
 }
 
 wxSize wxButton::DoGetBestSize() const