X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/32cd189dfcfe96c41e32c3b9827bf67484c60b13..a4761b4c08e6272c69bd242b3323ab47dbbc8902:/src/cocoa/statbox.mm diff --git a/src/cocoa/statbox.mm b/src/cocoa/statbox.mm index 289294fff6..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(GetLabelText(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]); +}