Parent Property (All CDO Rendering Library Objects)
Parent Property (All CDO Rendering Library Objects)
Important The Collaboration Data Objects (CDO) 1.2.1 Rendering objects are not installed by or supported for use with Exchange Server 2003 or later.
The Parent property returns the parent of the object. Read-only.
Syntax
Set objParent = object.Parent
Data Type
Object
Remarks
The Parent property in the CDO Rendering Library returns the immediate parent of an object. The immediate parent for each object is shown in the following table.
CDO Rendering Library object |
Immediate parent in object hierarchy |
Views collection |
|
Columns collection |
|
Columns collection |
|
RenderingApplication or Nothing |
|
Formats collection |
|
Formats collection |
|
RenderingApplication or Nothing |
|
Patterns collection |
|
Patterns collection |
|
Set to Nothing |
|
Views collection |
|
Views collection |
The Parent property represents the immediate parent of the object, rather than the logical parent. For example, a ContainerRenderer object contains a Views collection, which contains various view objects. The Parent property for a view is the immediate parent, the Views collection, rather than the logical parent, the ContainerRenderer object.
For more information on the CDO Rendering Library object hierarchy, see Rendering Object Model.
Example
This code fragment displays the Class of the Parent of a Formats collection object, which could be any rendering object.
Dim colFmts As Formats
Dim parentClass as Long
' assume valid Formats collection
parentClass = colFmts.Parent.Class
MsgBox "Formats parent class = " & parentClass
If 3 = parentClass Then ' CdoClassContainerRenderer
' parent is ContainerRenderer
ElseIf 2 = parentClass Then ' CdoClassObjectRenderer
' parent is ObjectRenderer
Else
' Houston, we have a problem
End If