IWxView.ActiveTool

Syntax

ActiveTool: WxTool;

Description

The ActiveTool property determines an active tool.

Example

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(1010);
    Arrow.LastPoint := New GxPointF.Create(319);
    Ellipse := Wsp.CreateEllipse;
    View.ActiveTool := WxTool.SelectOnly;
    View.ExplorerMode := False;
End Sub Button1OnClick;

After executing the example the SelectOnly mode is set and selection of the whole object is enabled.

See also:

IWxView