IWxShape.Parent

Syntax

Parent: IWxContainer;

Description

The Parent property returns a parent container of the shape. Only object group is allowed to have child objects.

Example

Executing the example requires that repository contains a workspace with the WSP identifier containing group of objects, one of them is with the Shape1 identifier.

Add links to the Andy, Metabase system assemblies.

Sub UserProc;
Var
    mb: Imetabase;
    wsp: IWxWorkspace;
    Shape: IWxShape;
    Group: IWxGroup;
Begin
    
// Get workspace for editing
    mb := MetabaseClass.Active;
    wsp := mb.ItemById(
"WSP").Edit As IWxWorkspace;
    
// Get shape
    wsp.BeginUpdate;
    Shape := wsp.Shapes.FindById(
"Shape1");
    Group := Shape.Parent 
As IWxGroup;
    Group.AllowObjectSelection := 
False;
    wsp.EndUpdate;
    
// Save changes
    (wsp As IMetabaseObject).Save;
End Sub UserProc;

After executing the example object selection within a group is disabled. The object with the Shape1 identifier is a group member.

See also:

IWxShape