XRC_ADD_STYLE(wxALIGN_CENTRE_VERTICAL);
XRC_ADD_STYLE(wxADJUST_MINSIZE);
+ XRC_ADD_STYLE(wxFIXED_MINSIZE);
}
{
// create a sizer item for it
wxSizerItem* sitem = MakeSizerItem();
- SetSizerItemAttributes(sitem);
// now fetch the item to be managed
bool old_gbs = m_isGBS;
else
wxLogError(wxT("Error in resource."));
+ // finally, set other wxSizerItem attributes
+ SetSizerItemAttributes(sitem);
+
AddSizerItem(sitem);
return item;
}
wxXmlNode *parentNode = m_node->GetParent();
wxCHECK_MSG(m_parentSizer != NULL ||
- (parentNode->GetType() == wxXML_ELEMENT_NODE &&
+ (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE &&
m_parentAsWindow != NULL &&
(m_parentAsWindow->IsKindOf(CLASSINFO(wxPanel)) ||
m_parentAsWindow->IsKindOf(CLASSINFO(wxFrame)) ||
// save state
wxSizer *old_par = m_parentSizer;
bool old_ins = m_isInside;
- bool old_gbs = m_isGBS;
// set new state
m_parentSizer = sizer;
CreateChildren(m_parent, TRUE/*only this handler*/);
// restore state
- old_gbs = m_isGBS;
m_isInside = old_ins;
m_parentSizer = old_par;
sitem->SetBorder(GetDimension(wxT("border")));
wxSize sz = GetSize(wxT("minsize"));
if (!(sz == wxDefaultSize))
- sitem->SetInitSize(sz.x, sz.y);
+ sitem->SetMinSize(sz);
sz = GetSize(wxT("ratio"));
if (!(sz == wxDefaultSize))
sitem->SetRatio(sz);
if (m_isGBS)
{
wxGBSizerItem* gbsitem = (wxGBSizerItem*)sitem;
- gbsitem->SetPos(GetGBPos(wxT("pos")));
- gbsitem->SetSpan(GetGBSpan(wxT("span")));
+ gbsitem->SetPos(GetGBPos(wxT("cellpos")));
+ gbsitem->SetSpan(GetGBSpan(wxT("cellspan")));
}
}