ITabView.HitTestObject

Syntax

HitTestObject(X: Integer; Y: Integer): ITabObject;

Parameters

X. X coordinate.

Y. Y coordinate.

Description

The HitTestObject method returns the table object, containing the point, the coordinates of which are passed as input parameters. These coordinates can be received using any of table events, the argument of which contains the property pPoint.

Example

Sub TabSheetBox1OnMouseDown(Sender: Object; Args: IMouseClickEventArgs);

Var

Obj: ITabObject;

s: String;

Begin

Obj := UiTabSheet1.TabSheet.View.HitTestObject(Args.pPoint.X, Args.pPoint.y);

If Obj <> Null Then

s := Obj.Id;

Else

s := "No_Object";

End If;

End Sub TabSheetBox1OnMouseDown;

After executing the example the "s" variable will contain the identifier of the table object, if a mouse was clicked on it, otherwise - "No_Object".

See also:

ITabView