IReportBox.ClientToTab

Syntax

ClientToTab(Point: IGxPoint);

Parameters

Point - coordinates of the cursor with respect to the component that should be converted into coordinates with respect to the report.

Description

The ClientToTab method converts coordinates of the ReportBox component into coordinates of the report, which is the data source for this component.

Example

Let the following text is specified in the event for the mouse click in a cell of a report loaded into the ReportBox1 component:

Sub ReportBox1OnCellClick(Report: IReportBox; TabSheet: IPrxSheet; Row: Integer; Column: Integer);

Var

Point : IGxPoint;

Coord1,Coord2 :String;

Begin

Point := WinApplication.CursorPosition;

Coord1 := Point.X.ToString + ":" + Point.Y.ToString;

Point := ReportBox1.ScreenToClient(Point.X, Point.Y) As IGxPoint;

ReportBox1.ClientToTab(Point);

Coord2 := Point.X.ToString + ":" + Point.Y.ToString;

End Sub ReportBox1OnCellClick;

If you click in a report cell, the Coord1 variable will contain coordinates of the cursor with respect to the screen while the Coord2 variable will contain coordinates of the cursor with respect to the report loaded into the component.

See also:

IReportBox