X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/449c567346a1b3937e532cd87aac007faad76b04..bdbcded6a32fc216283b9af03267e02fc915448f:/src/cocoa/statbox.mm diff --git a/src/cocoa/statbox.mm b/src/cocoa/statbox.mm index a54fc3fb4f..202608a7be 100644 --- a/src/cocoa/statbox.mm +++ b/src/cocoa/statbox.mm @@ -16,6 +16,7 @@ #endif //WX_PRECOMP #include "wx/cocoa/autorelease.h" +#include "wx/cocoa/string.h" #import #import @@ -37,7 +38,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid, return false; m_cocoaNSView = NULL; SetNSBox([[NSBox alloc] initWithFrame:MakeDefaultNSRect(size)]); - [GetNSBox() setTitle:[NSString stringWithCString:title.c_str()]]; + [GetNSBox() setTitle:wxNSStringWithWxString(wxStripMenuCodes(title))]; if(m_parent) m_parent->CocoaAddChild(this); SetInitialFrameRect(pos,size); @@ -47,7 +48,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid, wxStaticBox::~wxStaticBox() { - DisassociateNSBox(m_cocoaNSView); + DisassociateNSBox(GetNSBox()); } void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const