NtApplication.NtGetText Method
Whenever a data object shall be displayed as text, the NtTimeChartControl needs to know the string to draw. 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
Overload List:
| Modifier / Return Value | Name and Parameters | Description |
|---|---|---|
|
|
|
For the data object given as parameter you will return the correct string representation. |
Return value:
The string that represents the object.
Parameters:
The data object that the Time Chart needs a string for.
Remarks:
The Time Chart guarantees to only call this interface mamber for those objects that are defined to be represented as text. For others that are to be drawn as bitmaps, icons or curves 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 text are of the same type (e.g. string) you can omit the casting completely. Please see the example below.
Example:
In many cases this function is sufficiently implemented by simply returning the object's string:
Now assume you added various data types to your Time Chart that all shall be drawn as text. The data types differ by their
See also:
