Caution: This version of this document is no longer maintained. For the latest documentation, see


Remove a given item and its children from its parents and siblings


void PtGenTreeRemoveItem( PtWidget_t *tree,
                          PtGenTreeItem_t *item );


This function unlinks the given item (together with its children) from its parent and brothers (if any) and sets item->parent and item->brother to NULL. The tree argument must point to the PtGenTree widget containing item or can be NULL if item doesn't belong to any tree.

If tree is NULL and item has no parent but has a previous sibling, then PtGenTreeRemoveItem() can't find the previous sibling and can't unlink item from its sibling. The function does nothing if item->parent and tree are NULL.

PtGenTreeRemoveItem() never clears the Pt_TREE_ITEM_EXPANDABLE flag in the item's parent.



Interrupt handler No
Signal handler No
Thread No

See also:

PtGenTree, PtGenTreeItem_t