Shapes: IWxShapes;
The Shapes property returns a shape collection.
Executing the example requires a form with the Button and UiWorkspaceObject components with the Button1 and UiWorkspaceObject1 identifiers, respectively. A corresponding repository object must be connected to UiWorkspaceObject. This component must also contain a previously created shape.
Add links to the Andy, Drawing, Metabase system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
ws: IWxWorkspace;
Shapes: IWxShapes;
Shape: IWxShape;
Begin
ws := UiWorkspaceObject1.Instance As IWxWorkspace;
ws.BeginUpdate;
Shapes := ws.Shapes;
Shape := Shapes.Item(0);
Shape.Angle := 40;
Shape.Size := New GxSizeF.Create(43, 78);
ws.EndUpdate;
End Sub Button1OnClick;
After executing the example the size and rotation angle of the shape are changed in the UiWorkspaceObject1 component on clicking the Button1 component.
See also: