]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/xrc/xh_sizer.cpp
Copyright cleanup
[wxWidgets.git] / contrib / src / xrc / xh_sizer.cpp
index 09a1bbc43a6a6d367b722c8646b0476a6c17840d..fa5cbdccfb2eaffd24a0c7b4bbd6510d2a5e867a 100644 (file)
@@ -68,6 +68,8 @@ wxSizerXmlHandler::wxSizerXmlHandler()
     XRC_ADD_STYLE(wxALIGN_CENTRE_HORIZONTAL);
     XRC_ADD_STYLE(wxALIGN_CENTER_VERTICAL);
     XRC_ADD_STYLE(wxALIGN_CENTRE_VERTICAL);
+    
+    XRC_ADD_STYLE(wxADJUST_MINSIZE);
 }
 
 
@@ -137,9 +139,10 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
 
         wxCHECK_MSG(m_parentSizer != NULL ||
                 ((IsOfClass(parentNode, wxT("wxPanel")) ||
+                  IsOfClass(parentNode, wxT("wxFrame")) ||
                   IsOfClass(parentNode, wxT("wxDialog"))) &&
                  parentNode->GetType() == wxXML_ELEMENT_NODE), NULL,
-                wxT("Incorrect use of sizer: parent is not 'wxDialog' or 'wxPanel'."));
+                wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'."));
 
         if (m_class == wxT("wxBoxSizer"))
             sizer = new wxBoxSizer(GetStyle(wxT("orient"), wxHORIZONTAL));
@@ -147,7 +150,12 @@ wxObject *wxSizerXmlHandler::DoCreateResource()
         else if (m_class == wxT("wxStaticBoxSizer"))
         {
             sizer = new wxStaticBoxSizer(
-                         new wxStaticBox(m_parentAsWindow, -1, GetText(wxT("label"))),
+                         new wxStaticBox(m_parentAsWindow,
+                                         GetID(),
+                                         GetText(wxT("label")),
+                                         wxDefaultPosition, wxDefaultSize,
+                                         0/*style*/,
+                                         GetName()),
                          GetStyle(wxT("orient"), wxHORIZONTAL));
         }