ActiveShape: IWxShape;
The ActiveShape property determines an active shape.
Executing the example requires a form with the Button1 button, the WorkspaceBox component named WorkspaceBox1 and a data source for the WorkspaceBox1 component.
Add links to the Andy, Drawing, Workspace system assemblies.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Wsp: IWxWorkspace;
View: IWxView;
Arrow: IWxArrow;
Ellipse: IWxEllipse;
Begin
// Get workspace for editing
Wsp := UiWorkspace1.WxWorkspace;
View := Wsp.CreateView;
View := Wsp.Views.Item(0);
Arrow := Wsp.CreateArrow;
Arrow.FirstPoint := New GxPointF.Create(10, 10);
Arrow.LastPoint := New GxPointF.Create(3, 19);
Ellipse := Wsp.CreateEllipse;
View.ActiveShape := Arrow;
End Sub Button1OnClick;
After executing the example, a figured arrow is highlighted on workspace.
See also: