GetShapeByPt(Pt: IGxPoint): 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, 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;
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;
After executing the example, on hovering the cursor on ETL task working area and clicking the mouse button, if the cursor is hovered on any shape, the shape identifier will be displayed to the shape header.
See also: