diff --git a/contrib/src/xml/xh_sizer.cpp b/contrib/src/xml/xh_sizer.cpp index 5b9bd3d436..ae7cda12f1 100644 --- a/contrib/src/xml/xh_sizer.cpp +++ b/contrib/src/xml/xh_sizer.cpp @@ -24,6 +24,7 @@ #include "wx/log.h" #include "wx/statbox.h" #include "wx/notebook.h" +#include "wx/tokenzr.h" bool wxSizerXmlHandler::IsSizerNode(wxXmlNode *node) { @@ -152,14 +153,35 @@ wxObject *wxSizerXmlHandler::DoCreateResource() GetDimension(_T("vgap")), GetDimension(_T("hgap"))); else if (m_Class == _T("wxFlexGridSizer")) - sizer = new wxFlexGridSizer(GetLong(_T("rows")), GetLong(_T("cols")), - GetDimension(_T("vgap")), GetDimension(_T("hgap"))); + { + wxFlexGridSizer *fsizer = + new wxFlexGridSizer(GetLong(_T("rows")), GetLong(_T("cols")), + GetDimension(_T("vgap")), GetDimension(_T("hgap"))); + sizer = fsizer; + wxStringTokenizer tkn; + unsigned long l; + tkn.SetString(GetParamValue(_T("growablerows")), _T(",")); + while (tkn.HasMoreTokens()) + { + if (!tkn.GetNextToken().ToULong(&l)) + wxLogError(_T("growablerows must be comma-separated list of row numbers")); + else + fsizer->AddGrowableRow(l); + } + tkn.SetString(GetParamValue(_T("growablecols")), _T(",")); + while (tkn.HasMoreTokens()) + { + if (!tkn.GetNextToken().ToULong(&l)) + wxLogError(_T("growablecols must be comma-separated list of column numbers")); + else + fsizer->AddGrowableCol(l); + } + } wxSize minsize = GetSize(_T("minsize")); if (!(minsize == wxDefaultSize)) sizer->SetMinSize(minsize); - wxSizer *old_par = m_ParentSizer; m_ParentSizer = sizer; bool old_ins = m_IsInside; diff --git a/contrib/utils/wxrcedit/df/wxBoxSizer.df b/contrib/utils/wxrcedit/df/wxBoxSizer.df index 214ae7dcd9..50b38a2dd4 100644 --- a/contrib/utils/wxrcedit/df/wxBoxSizer.df +++ b/contrib/utils/wxrcedit/df/wxBoxSizer.df @@ -3,5 +3,5 @@ type sizer icon 0 childtype sizer_item derived from panel_item -var orient of flags wxHORIZONTAL,wxVERTICAL +var orient of choice wxHORIZONTAL,wxVERTICAL var minsize of coord diff --git a/contrib/utils/wxrcedit/df/wxFlexGridSizer.df b/contrib/utils/wxrcedit/df/wxFlexGridSizer.df index dfb093dd54..6787519676 100644 --- a/contrib/utils/wxrcedit/df/wxFlexGridSizer.df +++ b/contrib/utils/wxrcedit/df/wxFlexGridSizer.df @@ -8,3 +8,6 @@ var cols of integer var vgap of dimension var hgap of dimension var minsize of coord +var growablecols of text +var growablerows of text +