ChildShapes: IWxShape;
The ChildShapes property returns a collection of shapes that are direct child objects.
Only an object group or a workspace can have child objects.
Executing the example requires that repository contains a workspace with the WSP identifier containing group of objects with the Shape3 identifier.
Add links to the Andy, Drawing, Metabase system assemblies.
Sub UserProc;
Var
mb: IMetabase;
ws: IWxWorkspace;
Group: IWxGroup;
Shapes: IWxShapes;
Shape: IWxShape;
Begin
// Get workspace for editing
mb := MetabaseClass.Active;
ws := mb.ItemById("WSP").Edit As IWxWorkspace;
Shapes := ws.Shapes;
ws.BeginUpdate;
Group := ws.Shapes.FindById("Shape3") As IWxGroup;
Shape := Group.ChildShapes.Item(0);
Shape.Style.BackgroundBrushForeColor := GxColor.FromName("Red");
ws.EndUpdate;
(ws As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the background of one object belonging to a group is changed.
See also: