Consolidate cocoa view/control/cell label setting into wxControl::CocoaSetLabelForObject.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2007-08-06 13:47:09 +00:00
parent 35c63208f0
commit 525007cf12
7 changed files with 26 additions and 10 deletions

View File

@@ -37,7 +37,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID winid,
return false;
m_cocoaNSView = NULL;
SetNSBox([[NSBox alloc] initWithFrame:MakeDefaultNSRect(size)]);
[GetNSBox() setTitle:wxNSStringWithWxString(GetLabelText(title))];
CocoaSetLabelForObject(title, GetNSBox());
if(m_parent)
m_parent->CocoaAddChild(this);
SetInitialFrameRect(pos,size);
@@ -67,7 +67,7 @@ void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const
void wxStaticBox::SetLabel(const wxString& label)
{
wxAutoNSAutoreleasePool pool;
[GetNSBox() setTitle:wxNSStringWithWxString(label)];
CocoaSetLabelForObject(label, GetNSBox());
}
wxString wxStaticBox::GetLabel() const