X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1ce969dfb27f5d366ee6a0de3ff2bc0205b56a..5a1e0e91a1ca5ec98b0eeb335cda757d1261ed08:/src/cocoa/checkbox.mm diff --git a/src/cocoa/checkbox.mm b/src/cocoa/checkbox.mm index dccffa0053..c17d1152fc 100644 --- a/src/cocoa/checkbox.mm +++ b/src/cocoa/checkbox.mm @@ -47,7 +47,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID winid, [m_cocoaNSView release]; [GetNSButton() setButtonType: NSSwitchButton]; [GetNSButton() setAllowsMixedState: Is3State()]; - [GetNSButton() setTitle:wxNSStringWithWxString(wxStripMenuCodes(label))]; + [GetNSButton() setTitle:wxNSStringWithWxString(GetLabelText(label))]; [GetNSControl() sizeToFit]; if(m_parent) @@ -142,4 +142,12 @@ void wxCheckBox::SetLabel(const wxString& s) wxAutoNSAutoreleasePool pool; [GetNSButton() setTitle:wxNSStringWithWxString(s)]; } -#endif + +wxString wxCheckBox::GetLabel() const +{ + wxAutoNSAutoreleasePool pool; + return wxStringWithNSString([GetNSButton() title]); + +} + +#endif // wxUSE_CHECKBOX