IMouseEventReceiver

Hello,
i'd like to create a custom tool and i'm following the logic explained in the Knowledge Base. I'd like to ask where i can find the IMouseEventReceiver class that must be inherited by the custom tool one.

Thanks

2 Replies

GR Gianni Rossi September 19, 2007 02:40 PM UTC

I've read in the forum that the interface class should be defined as Syncfusion.Windows.Forms.Diagram.IMouseEventReceiver
but i cannot find it here in my installation.
Has something changed in the lastest version of the component?


J. J.Nagarajan Syncfusion Team September 20, 2007 08:52 PM UTC

Hi GTec,

Thanks for your interest in Syncfusion products.

IMouseEventReceiver interface is no longer valid in v5.2. You can use ProcessMouseDown, ProcessMouseMove and ProcessMouseUp methods for firing events in the customtool.

You have to derive a Tool class to create a custom tool. After creating a custom tool you have to register it in Diagram Controller. Please refer to the following code snippet

[C#]

//To activate the LineTool in MainForm.cs

MyLineTool linetool = new MyLineTool(this.diagram1.Controller);
this.diagram1.Controller.RegisterTool(linetool);
this.diagram1.Controller.ActivateTool(linetool);


I have attached the sample that demonstrates this completely. You can download the sample from the following page.

http://websamples.syncfusion.com/samples/Diagram.Windows/F68370/main.htm

Please refer to the sample and let me know if this helps.

Regards,
Nagaraj

Loader.
Up arrow icon