Parent Property (All CDO Rendering Library Objects)

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
CalendarView Views collection
Column Columns collection
Columns collection TableView
ContainerRenderer RenderingApplication or Nothing
Format Formats collection
Formats collection ContainerRenderer, ObjectRenderer, or RenderingApplication
ObjectRenderer RenderingApplication or Nothing
Pattern Patterns collection
Patterns collection Format
RenderingApplication Set to Nothing
TableView Views collection
Views collection ContainerRenderer

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