NtCustomObjectPaint.NtCreateDisplayObject Method
The data objects in a NtTimeChartControl are not directly used for drawing. Instead for each data object that resides on the
NtTimeChartControl's sheet (and thereby is visible or can become visible by scrolling) a NtDisplayObject
is created which is then used to draw the item.
For custom drawing the NtTimeChartControl does not know how to create a NtDisplayObject. So it calls this
interface method to let the application do it.
Example:
If drawing your customized Display Objects is really easy (for example just a circle with fixed radius on the time stamp of the Data Object) then there is no need to create your own derived class of
NtDisplayObject. Instead it is fine to use NtDisplayObject just as it is so your implementation of this interface
member simply looks like this:
Overload List:
| Modifier / Return Value | Name and Parameters | Description |
|---|---|---|
| NtDisplayObject |
|
Implement this interface method to create a display object for the data object given. |
Return value:
Parameters:
The NtTimeChartControl that does the call. Normally not used if you have only one NtTimeChartControl
in your Form or application. But if you have more than one NtTimeChartControl and implement this interface only once, this parameter might be helpful.
The data object to create a NtDisplayObject for.
The NtDisplayDef that defines certain parameters for drawing this object: Colors, preferred row height etc. If you prefer an unconfigurable constant way of drawing
the objects you can ignore this parameter.
The Graphics object of the NtTimeChartControl. This can be helpful for calculating text boundaries and sizes so you do not need to create a Graphics object
by yourself (which would be slow).
Remarks:
None.
