IWxSelectedShapes.Size

Syntax

Size(Sizing: WxShapesSizing);

Size(Sizing: Prognoz.Platform.Interop.Andy.WxShapesSizing);

Parameters

Sizing. Resizing type.

Description

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

Example

Executing the example requires a form with the Button1 button, the WorkspaceBox component and the UiWorkspace component named UiWorkspace1, which is a data source for WorkspaceBox.

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

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

 
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    ws: IWxWorkspace;
    Rect: IWxRectangle;
    Ellipse: IWxEllipse;
    pos: GxPointF = 
New GxPointFClass();
    Size: GxSizeF = 
New GxSizeFClass();
    SelectS: IWxSelectedShapes;
Begin
    ws := uiWorkspaceNet1.WxWorkspace;
    ws.BeginUpdate();
    Rect := ws.CreateRectangle();
    pos.Create(
2010);
    Size.Create(
107);
    Rect.PinPosition := pos;
    Rect.Size := Size;
    Ellipse := ws.CreateEllipse();
    pos.Create(
4050);
    Size.Create(
4015);
    Ellipse.PinPosition := pos;
    Ellipse.Size := Size;
    SelectS := ws.Views.Item[
0].SelectedShapes;
    SelectS.Add(Rect);
    SelectS.Add(Ellipse);
    SelectS.Size(WxShapesSizing.wssMaxWidth);
    ws.EndUpdate();
End Sub;

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

See also:

IWxSelectedShapes