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


Unlink an item


void PtTreeRemoveItem( PtWidget_t *tree,
                       PtTreeItem_t *item );


This function unlinks the given item together with its children from its parent and brothers (if any) and sets the item->gen.father and item-> fields to NULL:

Example of PtTreeRemoveItem()

The results of using PtTreeRemoveItem().

The tree argument must point to the PtTree widget containing the item, or can be NULL if the item doesn't belong to any tree.

Note that if tree is NULL and the item has no parent but has a previous brother, then the function can't find the previous brother, and therefore can't unlink the item from its brother. The function does nothing if item->gen.father and tree are NULL.

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



Interrupt handler No
Signal handler No
Thread No

See also:

PtTree, PtTreeAddAfter(), PtTreeAddFirst(), PtTreeAllocItem(), PtTreeFreeAllItems(), PtTreeFreeItems(), PtTreeItem_t, PtTreeRemoveChildren(), PtTreeRemoveList()