Ets_Tree_Element_Create()
Note: Requires OPNET Development Kit
Abstract
Makes a new tree element.
Syntax
Ets_Tree_Element_Create (elem_text, icon_name, closed_icon_name, state_ptr, destroy_proc, options)
| Argument | Type | Description |
|---|---|---|
elem_text |
const char * |
The text to be displayed for the element in the treeview. |
icon_name |
const char * |
Name of the open icon. |
closed_icon_name |
const char * |
Name of the closed icon. |
state_ptr |
void * |
Pointer to client state. |
destroy_proc |
EtsT_Tree_Element_OnDestroy_Proc |
Callback function to be called when element is destroyed, or NIL. |
options |
int |
OR'ed combination of status flags for the new element. See options in the Details section. |
Return Type
EtsT_Tree_Element *
The created tree element.
Header
ets_api_gui.h
Details
This function allocates memory for and initializes a new ETS tree element. The element's displayed text will be elem_text, and the icons used to draw the open and closed variants of that element are icon_name and closed_icon_name, respectively.
options
- The
optionsflags are associated with the tree element. The available options are: ETSC_TREE_ELEMENT_OPT_NONEETSC_TREE_ELEMENT_OPT_COMPUTE_CHILDREN—The element can have children. This option causes a “+” to be displayed for the tree element and allows clicking on the “+” to expand the node (via the treeview's ETS Expand Proc).ETSC_TREE_ELEMENT_OPT_COLUMNATED—The tree element can have multiple columns of text. Columns are indicated by placing “^” characters inelem_text.
To refresh the control, call Ets_Ctl_Tree_Refresh(). To add this element to a tree, use Ets_Tree_Element_Child_Add().