GoDiagram Web Reference
FindMouseTool(Type) Method

Find one of the tools used by this view that is an instance of a given tool type.
Syntax
'Declaration
 
Public Overloads Function FindMouseTool( _
   ByVal tooltype As Type _
) As IGoTool
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) ... }
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoView Class
GoView Members
Overload List
FindMouseTool(Type,Boolean) Method
ReplaceMouseTool Method

 

 


© 2013. Northwoods Software Corporation. All Rights Reserved.

Send Feedback