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.

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 options flags are associated with the tree element. The available options are:
  • ETSC_TREE_ELEMENT_OPT_NONE
  • ETSC_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 in elem_text.

To refresh the control, call Ets_Ctl_Tree_Refresh(). To add this element to a tree, use Ets_Tree_Element_Child_Add().

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com