+void PreviewFrame::PreviewWXFrame()
+{
+ //for this to work the frame MUST have a child panel!
+
+ wxXmlNode* child = m_Node;
+ wxString name;
+
+ while( child != NULL)
+ {
+ name = child->GetPropVal(_T("name"), _T("-1"));
+
+ if(name != _T("-1"))
+ {
+ wxXmlNode* parent = child->GetParent();
+ if(parent->GetPropVal(_T("class"),_T("-1")) == _T("wxPanel"))
+ break;
+ }
+ child = child->GetNext();
+ }
+
+ wxPanel *panel = m_RC->LoadPanel(m_ScrollWin, name);
+
+ if (panel == NULL)
+ wxLogError(_("Cannot preview the panel -- XML resource corrupted."));
+ else
+ {
+ m_ScrollWin->SetScrollbars(1, 1, panel->GetSize().x, panel->GetSize().y,
+ 0, 0, TRUE);
+ }