IAttachCPEventArgs.ShapeToAttach

Syntax

ShapeToAttach: IWxShape;

Description

The ShapeToAttach property returns the workspace object, to connecting point of which the end point of connecting line was joined.

Example

Executing the example requires a form with the WorkspaceBox component named WorkspaceBox1 and a data source for the WorkspaceBox1 component. The specified procedure is a handler of the OnAfterMoveCP event.

Add links to the Andy, Collections, ExtCtrls, Forms, Ui, and Workspace system assemblies.

Sub WorkspaceBox1OnAfterMoveCP(Sender: Object; Args: IAttachCPEventArgs);
    Var
        s: String;
    Begin
        If Args.ShapeToAttach <> Null Then
            s := Args.ShapeToAttach.Id;
    End If;
End Sub WorkspaceBox1OnAfterMoveCP;

After executing the event the "s" variable will contain identifier of the workspace object, to connecting point of which the end point of the connecting line that generated the OnAfterMoveCP event was joined.

See also:

IAttachCPEventArgs