From 81dc0f5d411284bf90236eb13f1bba4c9cd350ae Mon Sep 17 00:00:00 2001
From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= <vslavik@fastmail.fm>
Date: Sat, 12 Aug 2000 20:06:59 +0000
Subject: [PATCH] fixed creation of toolbars under MSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 contrib/src/xml/xh_toolb.cpp | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/contrib/src/xml/xh_toolb.cpp b/contrib/src/xml/xh_toolb.cpp
index d4c2887621..927642e641 100644
--- a/contrib/src/xml/xh_toolb.cpp
+++ b/contrib/src/xml/xh_toolb.cpp
@@ -41,7 +41,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
     if (m_Node->GetName() == _T("tool"))
     {
         wxCHECK_MSG(m_Toolbar, NULL, _T("Incorrect syntax of XML resource: tool not within a toolbar!"));
-        m_Toolbar->AddTool(GetID(), 
+        m_Toolbar->AddTool(GetID(),
                            GetBitmap(_T("bitmap")),
                            GetBitmap(_T("bitmap2")),
                            GetBool(_T("toggle")),
@@ -62,12 +62,16 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
     
     else /*<toolbar>*/
     {
+        int style = GetStyle(_T("style"), wxNO_BORDER | wxTB_HORIZONTAL);
+#ifdef __WXMSW__
+        if (!(style & wxNO_BORDER)) style |= wxNO_BORDER;
+#endif
         wxToolBar *toolbar = new wxToolBar(m_ParentAsWindow,
-                                           GetID(),
-                                           GetPosition(),
-                                           GetSize(),
-                                           GetStyle(),
-                                           GetName());
+                                    GetID(),
+                                    GetPosition(),
+                                    GetSize(),
+                                    style,
+                                    GetName());
 
         wxSize bmpsize = GetSize(_T("bitmapsize"));
         if (!(bmpsize == wxDefaultSize))
@@ -82,7 +86,6 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
         if (separation != -1)
             toolbar->SetToolSeparation(separation);
 
-
         wxXmlNode *children_node = GetParamNode(_T("children"));
         if (children_node == NULL) return toolbar;
 
-- 
2.47.2