]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_toolb.cpp
Use of blobs with a binding to a SQL_C_BINARY type column definition was not working...
[wxWidgets.git] / src / xrc / xh_toolb.cpp
index b35ee00b145d546eaf2061372dd3981639ab0e68..9bc524dc34c25f5751f34bfd583e146c5b39174b 100644 (file)
@@ -25,6 +25,8 @@
 
 #if wxUSE_TOOLBAR
 
+IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
+
 wxToolBarXmlHandler::wxToolBarXmlHandler() 
 : wxXmlResourceHandler(), m_isInside(FALSE), m_toolbar(NULL)
 {
@@ -37,6 +39,7 @@ wxToolBarXmlHandler::wxToolBarXmlHandler()
     XRC_ADD_STYLE(wxTB_NOICONS);
     XRC_ADD_STYLE(wxTB_NODIVIDER);
     XRC_ADD_STYLE(wxTB_NOALIGN);
+    AddWindowStyles();
 }
 
 wxObject *wxToolBarXmlHandler::DoCreateResource()
@@ -146,8 +149,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
 
         toolbar->Realize();
 
-        // FIXME: how can I create a toolbar without immediately setting it to the frame?
-        if (m_parentAsWindow)
+        if (m_parentAsWindow && !GetBool(wxT("dontattachtoframe")))
         {
             wxFrame *parentFrame = wxDynamicCast(m_parent, wxFrame);
             if (parentFrame)