Size(Sizing: WxShapesSizing);
Sizing. Resizing type.
The Size method resizes shapes based on the selected resizing type.
Sub Draw;
Var
UiWorkspace1: UiWorkspace;
Rect : IWxRectangle;
Ellipse : IWxEllipse;
pos : IGxPointF;
Size : IGxSizeF;
SelectS : IWxSelectedShapes;
Begin
UiWorkspace1.WxWorkspace.BeginUpdate;
Rect := UiWorkspace1.WxWorkspace.CreateRectangle;
Pos := New GxPointF.Create(20,10);
Size := New GxSizeF.Create(10,7);
Rect.PinPosition := Pos;
Rect.Size := Size;
Ellipse := UiWorkspace1.WxWorkspace.CreateEllipse;
Pos := New GxPointF.Create(40,50);
Size := New GxSizeF.Create(40,15);
Ellipse.PinPosition := Pos;
Ellipse.Size := Size;
SelectS := UiWorkspace1.WxWorkspace.Views.Item(0).SelectedShapes;
SelectS.Add(Rect);
SelectS.Add(Ellipse);
SelectS.Size(WxShapesSizing.MaxWidth);
UiWorkspace1.WxWorkspace.EndUpdate;
End Sub Draw;
After executing the example the width of shapes is changed for the width of the broadest shape.
See also: