Object Model Reference : Classes : S : SnapPoint : Properties : SnapPoint.Parent |
Property Parent As Shape
Member of SnapPoint
The Parent property returns a read-only value that is associated with the properties, methods, and controls of an objects parent in the CorelDRAW hierarchy of objects. The application object refers to the CorelDRAW application.
A parent object acts as a container for child objects. For example, a form (as a container) is the parent object of a check box on that form.
Most objects have either a Parent property or a Collection property, pointing to the objects parent object in the object model. The Collection property is used if the parent object is a collection.
The following VBA example selects one of the shapes to which the selected connector line is attached.
Sub Test() |
Dim sp As New SnapPoint |
If ActiveShape.Type <> cdrConnectorShape Then |
MsgBox "Select a connector line." |
Exit Sub |
End If |
Set sp = ActiveShape.Connector.StartPoint |
If sp.Type = cdrSnapPoint Then |
sp.Parent.CreateSelection |
End If |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.