ConvertPtToView(Pt: IGxPoint): IGxPointF;
ConvertPtToView(Pt: Prognoz.Platform.Interop.Drawing.GxPoint): Prognoz.Platform.Interop.Drawing.GxPointF;
Pt. The screen point coordinates, by which it is necessary to get the coordinates in the component working area.
The ConvertPtToView method enables the user to get point coordinates in the working area using point screen coordinates.
Executing the example requires a form with a button named Button1, the UiEtlObject component named UiEtlObject1 and the EtlBox component named EtlBox1. UiEtlObject1 is selected as a data source for EtlBox1. Any ETL task is connected to UiEtlObject1. Connect to the Drawing system assembly.
Sub EtlBox1OnMouseDown(Sender: Object; Args: IMouseClickEventArgs);
Var
Pt: IGxPoint;
PtF: IGxPointF;
x, y: Double;
Begin
Pt := Args.pPoint As IGxPoint;
PtF := EtlBox1.ConvertPtToView(Pt);
x := PtF.X;
y := PtF.Y;
End Sub EtlBox1OnMouseDown;
Clicking on any component, coordinates of the ETL task working area, where the click was made, will be recorded to the X and Y variables.
See also: