IWxSelectedShapes.Remove

Syntax

Remove(Value: IWxShape);

Parameters

Value. Shape.

Description

The Remove method removes the specified shape from the collection of selected shapes.

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;
    SelectS: IWxSelectedShapes;
Begin
    Wsp := UiWorkspace1.WxWorkspace;
    Wsp.BeginUpdate;
    Rect := Wsp.CreateRectangle;
    Pos := New GxPointF.Create(2010);
    Rect.PinPosition := Pos;
    Rect.Text := "Rectangle";
    Ellipse := Wsp.CreateEllipse;
    Pos := New GxPointF.Create(4050);
    Ellipse.PinPosition := Pos;
    Ellipse.Text := "Ellipse";
    SelectS := Wsp.Views.Item(0).SelectedShapes;
    SelectS.Add(Rect);
    SelectS.Add(Ellipse);
    SelectS.Align(WxShapesAlignment.VerticalCenter);
    SelectS.Remove(Ellipse);
    Wsp.EndUpdate;
End Sub Button1OnClick;

After executing the example the created objects are aligned to the vertical center, and the ellipse is deselected.

See also:

IWxSelectedShapes