ITabView.HitTestRegion

Syntax

HitTestRegion(X: Integer; Y: Integer): ITabRegion;

Parameters

X. X coordinate.

Y. Y coordinate.

Description

The HitTestRegion method returns the table region, containing the point, the coordinates of which are passed as input parameters. You can get these coordinates using any table event argument of which contains the pPoint property.

Example

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

Var

Reg: ITabRegion;

s: String;

Begin

Reg := UiTabSheet1.TabSheet.View.HitTestRegion(Args.pPoint.X, Args.pPoint.y);

If Reg <> Null Then

s := Reg.Range.Address;

Else

s := "No_Object";

End If;

End Sub TabSheetBox1OnMouseDown;

After executing this example the "s" variable contains the address of a table region if this region has been clicked. Otherwise it contains "No_Object".

See also:

ITabView