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:
@@ -41,6 +41,9 @@ public:
|
||||
long style = 0, const wxString& name = wxStaticBoxNameStr);
|
||||
virtual ~wxStaticBox();
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel() const;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Cocoa callbacks
|
||||
// ------------------------------------------------------------------------
|
||||
|
@@ -63,3 +63,15 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
|
||||
if(nextBorder > *borderOther)
|
||||
*borderOther = nextBorder;
|
||||
}
|
||||
|
||||
void wxStaticBox::SetLabel(const wxString& label)
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
[GetNSBox() setTitle:wxNSStringWithWxString(label)];
|
||||
}
|
||||
|
||||
wxString wxStaticBox::GetLabel() const
|
||||
{
|
||||
wxAutoNSAutoreleasePool pool;
|
||||
return wxStringWithNSString([GetNSBox() title]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user