IWxView.ArrangeShape

Syntax

ArrangeShape(Shape: IWxShape);

Parameters

Shape. Workspace shape.

Description

The ArrangeShape method places a shape on a diagonal, which runs from the upper top left corner to the bottom right corner of the view.

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for the WorkspaceBox1.

Add links to the Andy, Drawing, Workspace system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    ws: IWxWorkspace;
    view: IWxView;
    Shape: IWxShape;
    arrow: IWxArrow;
    ellipse: IWxEllipse;
    Shapes: IWxShapes;
    i: Integer;
Begin
    // Get workspace for editing
    ws := UiWorkspace1.WxWorkspace;
    view := ws.CreateView;
    view := ws.Views.Item(0);
    arrow := ws.CreateArrow;
    Arrow.FirstPoint := New GxPointF.Create(1010);
    Arrow.LastPoint := New GxPointF.Create(319);
    ellipse := ws.CreateEllipse;
    Shapes := ws.Shapes;
    For i := 0 To Shapes.Count - 1 Do
        view.ArrangeShape(Shapes.Item(i));
    End For;
End Sub Button1OnClick;

After executing the example all workspace objects are placed diagonally.

See also:

IWxView