ADD_STYLE(wxNO_3D);
ADD_STYLE(wxTAB_TRAVERSAL);
ADD_STYLE(wxWS_EX_VALIDATE_RECURSIVELY);
+ ADD_STYLE(wxCLIP_CHILDREN);
+ AddWindowStyles();
}
wxObject *wxPanelXmlHandler::DoCreateResource()
{
- wxPanel *panel = new wxPanel(m_ParentAsWindow,
+ wxPanel *panel = wxDynamicCast(m_instance, wxPanel);
+
+ if (panel == NULL)
+ panel = new wxPanel(m_parentAsWindow,
+ GetID(),
+ GetPosition(), GetSize(),
+ GetStyle(wxT("style"), 0),
+ GetName());
+ else
+ panel->Create(m_parentAsWindow,
GetID(),
GetPosition(), GetSize(),
- GetStyle(_T("style"), 0),
+ GetStyle(wxT("style"), 0),
GetName());
SetupWindow(panel);
CreateChildren(panel);
bool wxPanelXmlHandler::CanHandle(wxXmlNode *node)
{
- return node->GetName() == _T("panel");
+ return IsOfClass(node, wxT("wxPanel"));
}