implemented Set/GetLabel() (part of patch 1679337)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-13 23:46:08 +00:00
parent d174f457e6
commit aa67a27af1
2 changed files with 15 additions and 0 deletions

View File

@@ -41,6 +41,9 @@ public:
long style = 0, const wxString& name = wxStaticBoxNameStr); long style = 0, const wxString& name = wxStaticBoxNameStr);
virtual ~wxStaticBox(); virtual ~wxStaticBox();
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel() const;
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
// Cocoa callbacks // Cocoa callbacks
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------

View File

@@ -63,3 +63,15 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
if(nextBorder > *borderOther) if(nextBorder > *borderOther)
*borderOther = nextBorder; *borderOther = nextBorder;
} }
void wxStaticBox::SetLabel(const wxString& label)
{
wxAutoNSAutoreleasePool pool;
[GetNSBox() setTitle:wxNSStringWithWxString(label)];
}
wxString wxStaticBox::GetLabel() const
{
wxAutoNSAutoreleasePool pool;
return wxStringWithNSString([GetNSBox() title]);
}