Ets_Icon_From_Text_Create()
Note: Requires OPNET Development Kit
Abstract
Creates an icon representing a specified text string.
Syntax
Ets_Icon_From_Text_Create (icon_name, text_value, fg_color, bg_color, options)
| Argument | Type | Description |
|---|---|---|
icon_name |
const char * |
Name for the icon. |
text_value |
const char * |
Text string to represent in the icon (see Details). |
fg_color |
EtsT_Color |
Foreground color for the text in the icon. |
bg_color |
EtsT_Color |
Background color for the text in the icon. |
options |
int |
Unused; set to ETSC_ICON_CREATE_OPT_NONE. |
Return Type
EtsT_Icon *
Pointer to the new icon; PRGC_NIL if unsuccessful (for example, if an icon already exists with the given name).
Header
ets_api_icon.h
Details
This function dynamically creates an icon representing the string text_value. The string format can be either a simple string or text in ChartDirector Mark Up Language. The markup language allows you to specify formatting and embedded images. For example, the string
Test<*img=foo.gif*>
will produce an icon comprising the string “Test” followed by the specified image. The image file must be in the sys/images directory.
The newly created icon is placed in the default dynamic icon database. It will be destroyed when Ets_Icon_Unreference() is called and its reference count is 0. The icon is created with an initial reference count of 0. If the client is holding a reference to the icon, it should call Ets_Icon_Reference() to increase the reference count to 1.