GetShapeByPt(Pt: IGxPoint): IWxShape;
GetShapeByPt(Pt: Prognoz.Platform.Interop.Drawing.GxPoint): Prognoz.Platform.Interop.Andy.IWxShape;
Pt. Coordinates of the point located within the shape, the information about which must be obtained.
The GetShapeByPt method enables the user to get information about the shape by screen coordinates of the point that is located within the shape.
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;
Shape: IWxShape;
Begin
Pt := Args.pPoint As IGxPoint;
Shape := EtlBox1.GetShapeByPt(Pt);
If Shape <> Null Then
Self.Text := Shape.Id;
End If;
End Sub EtlBox1OnMouseDown;
On hovering the cursor on ETL task working area and pressing the mouse button, if the cursor is hovered on any shape, the shape identifier will be displayed to the shape header.
See also: