- ((IsOfClass(parentNode, wxT("wxPanel")) ||
- IsOfClass(parentNode, wxT("wxDialog"))) &&
- parentNode->GetType() == wxXML_ELEMENT_NODE), NULL,
- wxT("Incorrect use of sizer: parent is not 'wxDialog' or 'wxPanel'."));
+ (parentNode->GetType() == wxXML_ELEMENT_NODE &&
+ (m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
+ m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
+ m_parentAsWindow->IsKindOf(CLASSINFO(wxDialog)))
+ ), NULL,
+ wxT("Incorrect use of sizer: parent is not 'wxDialog', 'wxFrame' or 'wxPanel'."));