fixed creation of toolbars under MSW

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2000-08-12 20:06:59 +00:00
parent f19c82dd2a
commit 81dc0f5d41

View File

@@ -41,7 +41,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
if (m_Node->GetName() == _T("tool")) if (m_Node->GetName() == _T("tool"))
{ {
wxCHECK_MSG(m_Toolbar, NULL, _T("Incorrect syntax of XML resource: tool not within a toolbar!")); 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("bitmap")),
GetBitmap(_T("bitmap2")), GetBitmap(_T("bitmap2")),
GetBool(_T("toggle")), GetBool(_T("toggle")),
@@ -62,12 +62,16 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
else /*<toolbar>*/ 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, wxToolBar *toolbar = new wxToolBar(m_ParentAsWindow,
GetID(), GetID(),
GetPosition(), GetPosition(),
GetSize(), GetSize(),
GetStyle(), style,
GetName()); GetName());
wxSize bmpsize = GetSize(_T("bitmapsize")); wxSize bmpsize = GetSize(_T("bitmapsize"));
if (!(bmpsize == wxDefaultSize)) if (!(bmpsize == wxDefaultSize))
@@ -82,7 +86,6 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
if (separation != -1) if (separation != -1)
toolbar->SetToolSeparation(separation); toolbar->SetToolSeparation(separation);
wxXmlNode *children_node = GetParamNode(_T("children")); wxXmlNode *children_node = GetParamNode(_T("children"));
if (children_node == NULL) return toolbar; if (children_node == NULL) return toolbar;