NtApplication.NtGetIcon Method
Whenever data objects shall be displayed as a icons (which technically are Bitmaps), the NtTimeChartControl needs to get the Bitmap for this object.
So it will call this interface method to call your code. You will retreive the NtDataObject as a parameter. Your data is contained in the
This technology makes sense because in many cases the application does not store the icon within the data object itself. It rather stores a value (like a string) that allows the application to determine
the correct icon.
Overload List:
| Modifier / Return Value | Name and Parameters | Description |
|---|---|---|
|
|
|
For the data object given as parameter you will return the correct icon Bitmap. |
Return value:
The icon that represents the object.
Parameters:
The data object that the Time Chart wants to draw.
Remarks:
The Time Chart guarantees to only call this interface mamber for those objects that are defined to be represented as icons. For others that are to be drawn as strings, double values or Bitmaps with variable size, this method will never be called. This is important because you do not need to check the data type for these types. In other words, if all data objects that shall be drawn as icons are of the same type (e.g. strings) you can omit the casting completely.
Example:
Assume your application has a dictionary that contains the icons (in terms of Bitmaps) assigned to certain values that are string. Now your data is a set of strings. For each possible value that might occur
an icon is in place. Then your implementation of
For more details please see the Concept Bitmaps and Icons and the
Tutorial Bitmaps and Icons.
See also:
