X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/876cd6f7e3c4c4a005828f4e7f53897210d29635..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/cocoa/statbox.mm diff --git a/src/cocoa/statbox.mm b/src/cocoa/statbox.mm index bc36016905..ec23482002 100644 --- a/src/cocoa/statbox.mm +++ b/src/cocoa/statbox.mm @@ -37,7 +37,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid, return false; m_cocoaNSView = NULL; SetNSBox([[NSBox alloc] initWithFrame:MakeDefaultNSRect(size)]); - [GetNSBox() setTitle:wxNSStringWithWxString(wxStripMenuCodes(title))]; + CocoaSetLabelForObject(title, GetNSBox()); if(m_parent) m_parent->CocoaAddChild(this); SetInitialFrameRect(pos,size); @@ -63,3 +63,15 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const if(nextBorder > *borderOther) *borderOther = nextBorder; } + +void wxStaticBox::SetLabel(const wxString& label) +{ + wxAutoNSAutoreleasePool pool; + CocoaSetLabelForObject(label, GetNSBox()); +} + +wxString wxStaticBox::GetLabel() const +{ + wxAutoNSAutoreleasePool pool; + return wxStringWithNSString([GetNSBox() title]); +}