IWxSelectedShapes.Size

Syntax

Size(Sizing: WxShapesSizing);

Parameters

Sizing. Resizing type.

Description

The Size method resizes shapes based on the selected resizing type.

Example

Executing the example requires a form, a button named Button1 on the form, the WorkspaceBox component, and the UiWorkspace component named UiWorkspace1 that is used as a data source for WorkspaceBox.

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

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Wsp: IWxWorkspace;
    Rect: IWxRectangle;
    Ellipse: IWxEllipse;
    Pos: IGxPointF;
    Size: IGxSizeF;
    SelectS: IWxSelectedShapes;
Begin
    Wsp := UiWorkspace1.WxWorkspace;
    Wsp.BeginUpdate;
    Rect := Wsp.CreateRectangle;
    Pos := New GxPointF.Create(2010);
    Size := New GxSizeF.Create(107);
    Rect.PinPosition := Pos;
    Rect.Size := Size;
    Ellipse := Wsp.CreateEllipse;
    Pos := New GxPointF.Create(4050);
    Size := New GxSizeF.Create(4015);
    Ellipse.PinPosition := Pos;
    Ellipse.Size := Size;
    SelectS := Wsp.Views.Item(0).SelectedShapes;
    SelectS.Add(Rect);
    SelectS.Add(Ellipse);
    SelectS.Size(WxShapesSizing.MaxWidth);
    Wsp.EndUpdate;
End Sub Button1OnClick;

After executing the example the width of shapes is changed for the width of the broadest shape.

See also:

IWxSelectedShapes