Skip to main content

TcxCustomGridViewInfo.GetHitTest(Integer,Integer) Method

Returns the HitTest object identifying the View’s element located at a particular point (called test or 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 method 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. The complete list of values that can be returned by this method in grid Views can be found in the corresponding topics. 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. Refer to the Understanding HitTests topic for details.

See Also