We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

TooDeactivate event not getting fired

Thread ID:

Created:

Updated:

Platform:

Replies:

22028 Dec 1,2004 01:32 PM Dec 2,2004 03:24 PM Windows Forms 2
loading
Tags: Diagram
Truman Lackey
Asked On December 1, 2004 01:32 PM

I am trying to handle the ToolDeactivate event for the diagram controller. If I load a diagram using the loadsoap diagram method and then add a handler to handle the ToolDeactivate event my event handler is not being called. Other registered events are getting fired. A sample of this is attached. Any help would be appreciated. Thanks Truman WindowsApplication4_3089.zip

Administrator [Syncfusion]
Replied On December 2, 2004 02:43 PM

Hi Truman The Diagram internally calls MVCDispose() which destroys the model, view, and controller and ensures that they are completely disconnected from the diagram control, when you load a serialized Diagram. This seems to be a bug and I have brought it to the attention of the Diagram team. This behaviour is also exhibited in the Serialization sample that ships with Essential Diagram. Here is some code that can be added to the OpenFile()routine to wire the eventhandler to the new Controller to work around this issue for now: this.diagram1.Refresh(); //Wire the Controller Events this.diagram1.Controller.EventsEnabled = true; this.diagram1.Controller.ToolActivate+=new Syncfusion.Windows.Forms.Diagram.Controller.ToolEventHandler(diagram1_Controller_ToolActivate); Regards Arun

Administrator [Syncfusion]
Replied On December 2, 2004 03:24 PM

I found that I had to actually call CreateController() on the diagram. When the event handler was called after I had set EventsEnabled to true the Controller was nothing and the event threw and exception. Truman

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;