Create a tree item with attributes
PtTreeItem_t *PtTreeChangeItem( PtWidget_t *tree, PtTreeItem_t *item, const char *string, PtTreeItemAttributes_t const *attr );
This function changes an existing tree item, created with PtTreeCreateItem() or PtTreeAllocItem(). The string and attr parameters will override the existing item text string and attributes.
PtTreeChangeItem() can return a pointer to a new item that your
application must maintain.
Your code should look like this:
new_item = PtTreeChangeItem(tree, item, newname, NULL); if( new_item != null ) { item = new_item; } else { // Handle this error! ... } |
See “Allocating items and building a tree” in the description of PtTree.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtTree, PtTreeAddAfter(), PtTreeAllocItem(), PtTreeCreateItem(), PtTreeFreeAllItems(), PtTreeFreeItems(), PtTreeItem_t, PtTreeItemAttributes_t, PtTreeRootItem()