X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/56d2f75071fc2a29ec10abe97c5a908bb35f30f4..a07a98dbe53e6fa446dd40b0c5aa4b3c520b442f:/contrib/src/xml/xh_chckl.cpp diff --git a/contrib/src/xml/xh_chckl.cpp b/contrib/src/xml/xh_chckl.cpp index 7f709b14a4..5e22232d4b 100644 --- a/contrib/src/xml/xh_chckl.cpp +++ b/contrib/src/xml/xh_chckl.cpp @@ -26,6 +26,7 @@ wxCheckListXmlHandler::wxCheckListXmlHandler() : wxXmlResourceHandler(), m_InsideBox(FALSE) { // no styles + AddWindowStyles(); } wxObject *wxCheckListXmlHandler::DoCreateResource() @@ -34,7 +35,8 @@ wxObject *wxCheckListXmlHandler::DoCreateResource() { // need to build the list of strings from children m_InsideBox = TRUE; - CreateChildren( NULL, TRUE /* only this handler */); + CreateChildren( NULL, TRUE /* only this handler */, + GetParamNode(_T("content"))); wxString *strings = (wxString *) NULL; if( strList.GetCount() > 0 ) { @@ -56,7 +58,7 @@ wxObject *wxCheckListXmlHandler::DoCreateResource() ); // step through children myself (again.) - wxXmlNode *n = GetParamNode(_T("children")); + wxXmlNode *n = GetParamNode(_T("content")); if (n) n = n->GetChildren(); int i = 0; while (n) @@ -68,14 +70,8 @@ wxObject *wxCheckListXmlHandler::DoCreateResource() // checking boolean is a bit ugly here (see GetBool() ) wxString v = n->GetPropVal(_T("checked"), wxEmptyString); v.MakeLower(); - if (v) - { - if( v == _T("1") || v == _T("t") || v == _T("yes") || - v == _T("on") || v == _T("true") ) - { - control->Check( i, TRUE ); - } - } + if (v && v == _T("1")) + control->Check( i, TRUE ); i++; n = n->GetNext();