]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/toolbar.cpp
don't remove the old tags of different kinds when setting new style, this removes...
[wxWidgets.git] / src / univ / toolbar.cpp
index a83cc7fac3abde64a3a8684571b7215356de8849..ccdff2fd2c40a07b424ffa4942009fe3e68ee5ff 100644 (file)
@@ -104,8 +104,8 @@ public:
         m_underMouse = false;
     }
 
-    wxToolBarTool(wxToolBar *tbar, wxControl *control)
-        : wxToolBarToolBase(tbar, control)
+    wxToolBarTool(wxToolBar *tbar, wxControl *control, const wxString& label)
+        : wxToolBarToolBase(tbar, control, label)
     {
         // no position yet
         m_x =
@@ -190,9 +190,11 @@ bool wxToolBar::Create(wxWindow *parent,
         return false;
     }
 
+    FixupStyle();
+
     CreateInputHandler(wxINP_HANDLER_TOOLBAR);
 
-    SetBestSize(size);
+    SetInitialSize(size);
 
     return true;
 }
@@ -326,9 +328,10 @@ wxToolBarToolBase *wxToolBar::CreateTool(int id,
                              clientData, shortHelp, longHelp);
 }
 
-wxToolBarToolBase *wxToolBar::CreateTool(wxControl *control)
+wxToolBarToolBase *
+wxToolBar::CreateTool(wxControl *control, const wxString& label)
 {
-    return new wxToolBarTool(this, control);
+    return new wxToolBarTool(this, control, label);
 }
 
 // ----------------------------------------------------------------------------
@@ -421,7 +424,7 @@ bool wxToolBar::Realize()
     m_needsLayout = true;
     DoLayout();
 
-    SetBestSize(wxDefaultSize);
+    SetInitialSize(wxDefaultSize);
 
     return true;
 }