Previous Document Next Document
SnapPoint.Parent

Property Parent As Shape

Member of SnapPoint

The Parent property returns a value associated with the properties, methods, and controls of an object’s 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 object’s parent object in the object model. The Collection property is used if the parent object is a collection.

The Parent property returns a read-only value.

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.