X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e3e485bc855bb6aa3e3e7978eac9fb5eea0287e..41d0b41d6873cb50b7b025beb0cf9476d680004c:/src/cocoa/toolbar.mm diff --git a/src/cocoa/toolbar.mm b/src/cocoa/toolbar.mm index b831696cfe..7d923ed9c2 100644 --- a/src/cocoa/toolbar.mm +++ b/src/cocoa/toolbar.mm @@ -60,8 +60,8 @@ public: CreateButtonCell(); } - wxToolBarTool(wxToolBar *tbar, wxControl *control) - : wxToolBarToolBase(tbar, control) + wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label) + : wxToolBarToolBase(tbar, control, label) { Init(); } @@ -186,7 +186,13 @@ bool wxToolBar::Create( wxWindow *parent, const wxString& name ) { // Call wxControl::Create so we get a wxNonControlNSControl - return wxToolBarBase::Create(parent,winid,pos,size,style,wxDefaultValidator,name); + if ( !wxToolBarBase::Create(parent, winid, pos, size, style, + wxDefaultValidator, name) ) + return false; + + FixupStyle(); + + return true; } wxToolBarToolBase *wxToolBar::CreateTool(int toolid, @@ -202,9 +208,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int toolid, clientData, shortHelpString, longHelpString); } -wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control) +wxToolBarToolBase * +wxToolBar::CreateTool(wxControl *control, const wxString& label) { - return new wxToolBarTool(this, control); + return new wxToolBarTool(this, control, label); } void wxToolBar::SetWindowStyleFlag( long style )