Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreecreateitem.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreecreateitem.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreecreateitem.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreecreateitem.html on line 8
Create a tree item with attributes
PtTreeItem_t *PtTreeCreateItem(
PtWidget_t const *tree,
const char *string,
PtTreeItemAttributes_t const *attr
);
- tree
- A pointer to the PtTree widget that this
item will be added to.
- string
- The text to display for the item.
- attr
- A pointer to a PtTreeItemAttributes_t structure
which defines the attributes for the item. Set to NULL to
set no images for the item, and to use the widget-defined font and
colors.
This function creates a new tree item. The item's string is copied
from string.
Attributes are set with a PtTreeItemAttributes_t structure, passed
as attr. The item's Pt_TREE_ITEM_HAS_ATTRS is
set whether attr is passed as a pointer or NULL.
Both PtTreeAllocItem() and PtTreeCreateItem() create
a tree item. PtTreeCreateItem() lets you specify set
and unset images that are not already present in the widget's Pt_ARG_TREE_IMAGES array.
In general, if you want to use images in this array, you should
use PtTreeAllocItem().
|
An item created with PtTreeCreateItem(widget,string,NULL) behaves
identically to an item created with PtTreeAllocItem(widgetmstring,-1,-1),
except it has the Pt_TREE_ITEM_HAS_ATTRS flag set,
whereas the latter does not. |
Using PtTreeCreateItem() you can also specify text
and fill color attributes for selected and unselected items.
|
Use PtTreeAddFirst() and PtTreeAddAfter() to
add the new item to a tree structure. |
- A pointer to a PtTreeItem_t
- Success.
- NULL
- 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(), PtTreeChangeItem(), PtTreeFreeAllItems(), PtTreeFreeItems(), PtTreeItem_t, PtTreeItemAttributes_t,
PtTreeRootItem()
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreecreateitem.html on line 147
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttreecreateitem.html on line 147