]> git.saurik.com Git - wxWidgets.git/commitdiff
implement label setting
authorRyan Norton <wxprojects@comcast.net>
Fri, 22 Apr 2005 00:49:43 +0000 (00:49 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 22 Apr 2005 00:49:43 +0000 (00:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cocoa/checkbox.h
src/cocoa/checkbox.mm

index f457f3386b05dc0e3a84ed8a071350239fab8eae..4ce89830fca0befd79876c5a88d9da5828510a07 100644 (file)
@@ -58,6 +58,8 @@ protected:
 public:
     virtual void SetValue(bool);
     virtual bool GetValue() const;
+    virtual void SetLabel(const wxString& label);
+    virtual wxString GetLabel() const { return GetTitle(); }
 protected:
     virtual void DoSet3StateValue(wxCheckBoxState state);
     virtual wxCheckBoxState DoGet3StateValue() const;
index c75820d25716c4fd756bce1eaa557de347a79512..13ee14009c8362f256cfa43490eea272ef9631e5 100644 (file)
@@ -136,4 +136,9 @@ void wxCheckBox::Cocoa_wxNSButtonAction(void)
     Command(event);
 }
 
+void wxCheckBox::SetLabel(const wxString& s)
+{
+    wxAutoNSAutoreleasePool pool;
+    [GetNSButton() setTitle:wxNSStringWithWxString(s)];
+}
 #endif