]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/stattext.mm
add wx/univ/tglbtn.h to wxUniv headers
[wxWidgets.git] / src / cocoa / stattext.mm
index b009c21868abaa0f0f3f0b907a05c35df2012993..4c948ba801967ebf8487b4377399d534d35288c0 100644 (file)
@@ -44,7 +44,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID winid,
     m_cocoaNSView = NULL;
     SetNSTextField([[NSTextField alloc] initWithFrame:MakeDefaultNSRect(size)]);
     [m_cocoaNSView release];
-    [GetNSTextField() setStringValue:wxNSStringWithWxString(label)];
+    [GetNSTextField() setStringValue:wxNSStringWithWxString(wxStripMenuCodes(label, wxStrip_Mnemonics))];
 //    [GetNSTextField() setBordered: NO];
     [GetNSTextField() setBezeled: NO];
     [GetNSTextField() setEditable: NO];
@@ -70,7 +70,7 @@ wxStaticText::~wxStaticText()
 
 void wxStaticText::SetLabel(const wxString& label)
 {
-    [GetNSTextField() setStringValue:wxNSStringWithWxString(label)];
+    [GetNSTextField() setStringValue:wxNSStringWithWxString(wxStripMenuCodes(label, wxStrip_Mnemonics))];
     NSRect oldFrameRect = [GetNSTextField() frame];
     NSView *superview = [GetNSTextField() superview];
     wxLogTrace(wxTRACE_COCOA_Window_Size, wxT("wxStaticText::SetLabel Old Position: (%d,%d)"), GetPosition().x, GetPosition().y);