GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoView Class / FindMouseTool Method / FindMouseTool(Type) Method
In This Topic
    FindMouseTool(Type) Method
    In This Topic
    Find one of the tools used by this view that is an instance of a given tool type.
    Syntax
    public IGoTool FindMouseTool( 
       Type tooltype
    )

    Parameters

    tooltype

    Return Value

    null if no mouse tool's type is exactly tooltype
    Remarks
    This is most useful when you want to modify one of the standard tools, typically by setting one of its properties. This method searches all of the lists of mode-less tools: MouseDownTools, MouseMoveTools, MouseUpTools. Note that the class of the tool that is found must match exactly with the given tooltype--it cannot inherit from that type. This is implemented by calling FindMouseTool(tooltype, false).
    Example
    (myView.FindMouseTool(typeof(GoToolContext)) as GoToolContext).SingleSelection = false; (myView.FindMouseTool(typeof(GoToolLinkingNew)) as GoToolLinkingNew).ForwardsOnly = true; GoToolDragging dragtool = FindMouseTool(typeof(GoToolDragging)) as GoToolDragging; if (dragtool != null) { ... dragtool.ComputeEffectiveSelection(clipsel, false) ... }
    See Also