Previous Document Next Document
Shape.Connector

Property Connector As Connector

Member of Shape

The Connector property returns a Connector object for connector shapes.

The Connector property returns a read-only value.

The following code example creates a rectangle and an ellipse. It then creates a connector line and attaches it to the centers of the rectangle and ellipse.

Sub Test() 
 Dim r As Shape, e As Shape, c As Shape 
 Set r = ActiveLayer.CreateRectangle(0, 0, 2, 2) 
 Set e = ActiveLayer.CreateEllipse2(4, 2, 1) 
 Set c = ActiveLayer.CreateFreeConnector(1, 0, 4, 0) 
 c.Connector.StartPoint = r.SnapPoints(10) ' Center of rectangle 
 c.Connector.EndPoint = e.SnapPoints(6) ' Center of ellipse 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.