diff --git a/include/wx/xrc/xmlres.h b/include/wx/xrc/xmlres.h index 88c71fef49..e58f1c0551 100644 --- a/include/wx/xrc/xmlres.h +++ b/include/wx/xrc/xmlres.h @@ -620,7 +620,9 @@ public: if (m_instance) \ variable = wxStaticCast(m_instance, classname); \ if (!variable) \ - variable = new classname; + variable = new classname; \ + if (GetBool(wxT("hidden"), 0) == 1) \ + variable->Hide(); // FIXME -- remove this $%^#$%#$@# as soon as Ron checks his changes in!! diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 473db8717d..49ff0ff48a 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -2440,8 +2440,6 @@ void wxXmlResourceHandlerImpl::SetupWindow(wxWindow *wnd) wnd->Enable(false); if (GetBool(wxT("focused"), 0) == 1) wnd->SetFocus(); - if (GetBool(wxT("hidden"), 0) == 1) - wnd->Show(false); #if wxUSE_TOOLTIPS if (HasParam(wxT("tooltip"))) wnd->SetToolTip(GetText(wxT("tooltip")));