]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/statbox.mm
made wxFFile a bit more safe: don't crash when Tell() and Length() are called on...
[wxWidgets.git] / src / cocoa / statbox.mm
index 7e6e457e7ed1373c842dc5f011a0bb27c981146f..202608a7be39548cbd6dc8fa948cd34782474686 100644 (file)
@@ -16,6 +16,7 @@
 #endif //WX_PRECOMP
 
 #include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/string.h"
 
 #import <AppKit/NSBox.h>
 #import <Foundation/NSString.h>
@@ -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);