IWxSelectedShapes.Clear

Syntax

Clear();

Description

The Clear method clears a collection of selected shapes.

Example

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(Ellipse);

SelectS.Add(Rect);

SelectS.Align(WxShapesAlignment.VerticalCenter);

SelectS.Clear;

UiWorkspace1.WxWorkspace.EndUpdate;

End Sub Draw;

After executing the example the created objects are selected and aligned to the vertical center, following which the collection of selected shapes is cleared.

See also:

IWxSelectedShapes