Share via


Parent Property [Visio 2003 SDK Documentation]

As it applies to the AccelItem, AccelTable, Menu, MenuItem, MenuSet, Toolbar, ToolbarItem, ToolbarSet, and Window objects, and the AccelItems, AccelTables, MenuItems, Menus, MenuSets, Toolbars, ToolbarItems, and ToolbarSets collections.

Determines the parent of an object.

objRetobject**.Parent**

objRet = object**.Parent**

object.Parent =objExpression

objRet     The parent of the object.

object     Required. An expression that returns an object in the Applies to list.

Version added

3.0

Remarks

In general, an object's parent is the object that contains it. For example, the parent of a Menu object is the Menus collection that contains the Menu object, or the parent of a Window object is the Windows collection that contains the Window object.

As it applies to the Shape object.

Determines the parent of a Shape object.

objRet     The parent of the object.

object   Required. An expression that returns a Shape object.

objExpression     Required. The new parent of the object.

Version added

2002

Remarks

In general, an object's parent is the object that contains it. If a Shape object is a member of a group, the parent is that group. Otherwise, its parent is a Page or a Master object.

When assigning a new parent shape, you must assign a Shape object. If you want to assign a page or master to be the parent of a shape, you must assign the Shape object returned by the Page or Master object's PageSheet property.

A shape and its parent shape must be in the same containing page or containing master. If the new parent is not a Shape object, or if the ContainingPage or ContainingMaster property of the parent shape is different from that of the shape, Microsoft Office Visio raises an exception.

Applies to | AccelItem object | AccelItems collection | AccelTable object | AccelTables collection | Menu object | MenuItem object | MenuItems collection | Menus collection | MenuSet object | MenuSets collection | Shape object | Toolbar object | ToolbarItem object | ToolbarItems collection | Toolbars collection | ToolbarSet object | ToolbarSets collection | Window object

See Also | ContainingMaster property | ContainingPage property | ContainingShape property | Master object | Page object | PageSheet property | ParentWindow property