X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d174f457e6a3337d85dbfe1152308cf548e07fa3..35c63208f04930176aa34ec1fcabc4f3c19804b9:/src/cocoa/stattext.mm diff --git a/src/cocoa/stattext.mm b/src/cocoa/stattext.mm index b009c21868..4c948ba801 100644 --- a/src/cocoa/stattext.mm +++ b/src/cocoa/stattext.mm @@ -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);