API Documentation -> NtTimeChartControl -> GetDisplayObjectByXY

# NtTimeChartControl.GetDisplayObjectByXY Method

The NtTimeChartControl can contain millions of data objects. Of course there are only few of them visible at a time because data objects are spread over a wide time range (maybe years) while the visible area and the area covered by the sheet only range over several days or month.
For this reason, only those objects that touch the time range covered by the sheet do have a visual representation. Others consist of their data object, only. In other words: For those data objects that are currently visible there is also a display object doing the visual representation. These display objects are of type NtDisplayObject.
Call this method if you need to know which display object / data object is located at a specific location on the sheet.

Overload List:

Modifier / Return Value | Name and Parameters | Description
--- | --- | ---
public NtDisplayObject | GetDisplayObjectByXY ( int x, int y, int inflate ) | Returns the NtDisplayObject at the location (x, y).

Return value:

NtDisplayDef
Returns the NtDisplayObject at that location. null if there is not object. inflate enlarges this point. So even if the coordinates miss a certain object by the given amout of pixels it is still counted a hit. This makes sense, if you create display objects, that are very small and thereby for example hard to hit with the mouse (display objects may be dots).

Parameters:

int x
The X coordinate of the location to look up. Measured in sheet coordinates.

int y
The Y coordinate of the location to look up. Measured in sheet coordinates.

int inflate
The number of pixels the coordinates may miss the object vertically or horizontally and still count as a hit.

Remarks:

None.

See also:

NtDisplayObject

Top API Documentation -> NtTimeChartControl -> GetDisplayObjectByXY © 2016 Bassaly