Implement GetLabel and SetLabel

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott 2003-07-16 14:54:59 +00:00
parent 67158ef673
commit ce319b6d1b
2 changed files with 12 additions and 0 deletions

View File

@ -54,6 +54,8 @@ protected:
// Implementation
// ------------------------------------------------------------------------
public:
wxString GetLabel() const;
void SetLabel(const wxString& label);
};
#endif // __WX_COCOA_BUTTON_H__

View File

@ -66,6 +66,16 @@ void wxButton::Cocoa_wxNSButtonAction(void)
Command(event);
}
wxString wxButton::GetLabel() const
{
return wxString([[GetNSButton() title] lossyCString]);
}
void wxButton::SetLabel(const wxString& label)
{
[GetNSButton() setTitle:wxNSStringWithWxString(label)];
}
wxSize wxButtonBase::GetDefaultSize()
{
// FIXME: stub