Skip to main content

TcxCustomGridViewInfo.GetHitTest(Integer,Integer) Method

Returns HitTest information about the View’s element located at the inspected point.

Declaration

function GetHitTest(X: Integer; Y: Integer): TcxCustomGridHitTest; overload; virtual;

Parameters

Name Type
X Integer
Y Integer

Returns

Type
TcxCustomGridHitTest

Remarks

The overloaded variants allow you to specify the test point either via a TPoint structure or via integer values specifying the horizontal and vertical coordinates. Note that the coordinates should be relative to the View’s top-left corner.

The GetHitTest function returns a TcxCustomGridHitTest descendant whose properties and methods allow you to identify the element at the test point. You can use the returned object’s HitTestCode method to determine the element’s type. In some cases, you will not only need to determine the element’s type. For instance, if the test point is within a column header, you may want to determine the column whose header it is. TcxCustomGridHitTest descendants provide additional properties for that purpose.

See Also