Parent Property

Home Page (Objects)OverviewFAQReference

Applies to: Application object, Breakpoint object, Breakpoints object, Configuration object, Configurations object, Debugger object, Document object, Documents object, Project object, Projects object, TextDocument object, TextEditor object, TextSelection object, TextWindow object, Window object, Windows object

Gets the parent of an object.

Syntax

object.Parent

Parameters

object

An expression that evaluates to one of the objects in the Applies To list above. When you access the Parent property of the Application object, you can omit object because the name of the Application object is implied when you access its properties and methods.

Remarks

The Parent property's type depends on the object you access the property from (see the table below). For example, the Parent property of the Configuration object has the Project type.

Use the Parent property to access the properties and methods of an object's parent.

The following table shows the parent of each object:

Object Parent object
Application Application
Breakpoint Breakpoints
Breakpoints Application
Configuration Project
Configurations Project
Debugger Application
Document Application
Documents Application
Project Application
Projects Application
TextDocument Application
TextEditor Application
TextSelection TextDocument
TextWindow TextDocument
Window Document (for "Generic" window types)
TextDocument (for "Text" window types)
Windows Application

If object is a Window object, and this object is associated with a document, then the Parent property gets the corresponding Document object.

For the object hierarchy diagram, see Objects.

Example

The following example gets the parent of the Configurations collection:

Configurations.Parent