X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/56d2f75071fc2a29ec10abe97c5a908bb35f30f4..29fd317b4b5f7e9020ebb6f1187c5f8b3c28d5a3:/contrib/src/xml/xh_dlg.cpp diff --git a/contrib/src/xml/xh_dlg.cpp b/contrib/src/xml/xh_dlg.cpp index a05fb8e0bf..62b971a4e7 100644 --- a/contrib/src/xml/xh_dlg.cpp +++ b/contrib/src/xml/xh_dlg.cpp @@ -40,6 +40,8 @@ wxDialogXmlHandler::wxDialogXmlHandler() : wxXmlResourceHandler() ADD_STYLE(wxNO_3D); ADD_STYLE(wxTAB_TRAVERSAL); ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY); + ADD_STYLE(wxCLIP_CHILDREN); + AddWindowStyles(); } @@ -62,6 +64,9 @@ wxObject *wxDialogXmlHandler::DoCreateResource() CreateChildren(dlg); + if (GetBool(_("centered"), FALSE)) + dlg->Centre(); + return dlg; } @@ -69,7 +74,7 @@ wxObject *wxDialogXmlHandler::DoCreateResource() bool wxDialogXmlHandler::CanHandle(wxXmlNode *node) { - return node->GetName() == _T("dialog"); + return IsOfClass(node, _T("wxDialog")); }