]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/checkbox.mm
blind OS/2 compilation fix in wxSetWorkingDirectory()
[wxWidgets.git] / src / cocoa / checkbox.mm
index dccffa0053262cfc3d605e8278179e595b970598..c17d1152fcde79448f2a5d0e2d8b03effda96dff 100644 (file)
@@ -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