IEtlBox.ConvertPtToView

Syntax

ConvertPtToView(Pt: IGxPoint): IGxPointF;

Parameters

Pt. The screen point coordinates, by which it is necessary to get the coordinates in the component working area.

Description

The ConvertPtToView method enables the user to get point coordinates in the working area using point screen coordinates.

Example

Executing the example requires a form, a button named the Button1 on the form, 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.

Add links to the Drawing and ETL system assemblies.

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;

After executing the example, clicking on a component writes coordinates of the ETL task working area, where the click was made, to the X and Y variables.

See also:

IEtlBox