// Created: 2003/08/17
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
#include "wx/wxprec.h"
#if wxUSE_TOOLBAR_NATIVE
+
+#include "wx/toolbar.h"
+
#ifndef WX_PRECOMP
- #include "wx/toolbar.h"
#include "wx/frame.h"
#include "wx/log.h"
#endif // WX_PRECOMP
CreateButtonCell();
}
- wxToolBarTool(wxToolBar *tbar, wxControl *control)
- : wxToolBarToolBase(tbar, control)
+ wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label)
+ : wxToolBarToolBase(tbar, control, label)
{
Init();
}
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,
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 )