void wxTreeCtrlBase::ExpandAllChildren(const wxTreeItemId& item)
{
+ Freeze();
// expand this item first, this might result in its children being added on
// the fly
- Expand(item);
+ if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )
+ Expand(item);
+ //else: expanding hidden root item is unsupported and unnecessary
// then (recursively) expand all the children
wxTreeItemIdValue cookie;
{
ExpandAllChildren(idCurr);
}
+ Thaw();
}
void wxTreeCtrlBase::CollapseAll()
void wxTreeCtrlBase::CollapseAllChildren(const wxTreeItemId& item)
{
+ Freeze();
// first (recursively) collapse all the children
wxTreeItemIdValue cookie;
for ( wxTreeItemId idCurr = GetFirstChild(item, cookie);
// then collapse this element too
Collapse(item);
+ Thaw();
}
bool wxTreeCtrlBase::IsEmpty() const