X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ea813d914fed8d068a5ba36d94199ff2c9e83413..8cd6a9ad50c00a94e62558a3b55e814028d81100:/src/xrc/xh_sizer.cpp?ds=sidebyside diff --git a/src/xrc/xh_sizer.cpp b/src/xrc/xh_sizer.cpp index 8e5e9793c4..f5e2dcc466 100644 --- a/src/xrc/xh_sizer.cpp +++ b/src/xrc/xh_sizer.cpp @@ -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())