Previous Document Next Document

Object Model Reference : Classes : S : SnapPoint : Properties : SnapPoint.Parent


SnapPoint.Parent

Property Parent As Shape

Description

Member of SnapPoint

The Parent property returns a read-only value that is 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.

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.