Remove(Value: IWxShape);
Value. Shape.
The Remove method removes the specified shape from the collection of selected shapes.
Sub Draw;
Var
UiWorkspace1: UiWorkspace;
Rect : IWxRectangle;
Ellipse : IWxEllipse;
pos : IGxPointF;
SelectS : IWxSelectedShapes;
Begin
UiWorkspace1.WxWorkspace.BeginUpdate;
Rect := UiWorkspace1.WxWorkspace.CreateRectangle;
pos := New GxPointF.Create(20,10);
Rect.PinPosition := pos;
Rect.Text := "Rectangle";
Ellipse := UiWorkspace1.WxWorkspace.CreateEllipse;
pos := New GxPointF.Create(40,50);
Ellipse.PinPosition := pos;
Ellipse.Text := "Ellipse";
SelectS := UiWorkspace1.WxWorkspace.Views.Item(0).SelectedShapes;
SelectS.Add(Rect);
SelectS.Add(Ellipse);
SelectS.Align(WxShapesAlignment.VerticalCenter);
SelectS.Remove(Ellipse);
UiWorkspace1.WxWorkspace.EndUpdate;
End Sub Draw;
After executing the example the created objects are aligned to the vertical center, and the ellipse is deselected.
See also: