]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_sizer.cpp
added wxSpinCtrlDouble (slightly modified patch 1835864)
[wxWidgets.git] / src / xrc / xh_sizer.cpp
index 8e5e9793c451efbaeb987bb48b68f04da29d35c8..f5e2dcc46616ba1825cf0c0f6fe36b0c96b4818c 100644 (file)
@@ -27,6 +27,7 @@
     #include "wx/frame.h"
     #include "wx/dialog.h"
     #include "wx/button.h"
+    #include "wx/scrolwin.h"
 #endif
 
 #include "wx/gbsizer.h"
@@ -77,6 +78,7 @@ wxSizerXmlHandler::wxSizerXmlHandler()
     XRC_ADD_STYLE(wxALIGN_CENTRE_VERTICAL);
 
     XRC_ADD_STYLE(wxFIXED_MINSIZE);
+    XRC_ADD_STYLE(wxRESERVE_SPACE_EVEN_IF_HIDDEN);
 }
 
 
@@ -236,7 +238,16 @@ wxObject* wxSizerXmlHandler::Handle_sizer()
         wxXmlNode *nd = m_node;
         m_node = parentNode;
         if (GetSize() == wxDefaultSize)
-            sizer->Fit(m_parentAsWindow);
+        {
+            if ( wxDynamicCast(m_parentAsWindow, wxScrolledWindow) != NULL )
+            {
+                sizer->FitInside(m_parentAsWindow);
+            }
+            else
+            {
+                sizer->Fit(m_parentAsWindow);
+            }
+        }
         m_node = nd;
 
         if (m_parentAsWindow->IsTopLevel())