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. Image for the cookie policy date
close icon

event not being triggered: Diagram1_ControlRemoved

I have a diagram that allows users to add windows controls to it. When a user selects the control by clicking on it, then presses the delete key causing the control to be removed, the event ControlRemoved does not get triggerd.

How can I overcome this?

Version: 6.403.0.15



3 Replies

AM Ajeet M Syncfusion Team January 15, 2009 07:39 AM UTC

Hi Binary,

I am unable to understand your query with regard to the event "ControlRemoved". This is because the diagram control does not have any such event called "ControlRemoved".

I would be glad if you could provide with us the code or sample of your application that will help us investigate into this and provide you with a quick solution.

FYI, the syncfusion Diagram control captures each addition and/or deletion of nodes from the diagram using NodeCollectionChanging and NodeCollectionChanged event handles in the diagram1.EventSink.

Let me know if you shall need any further clarifications here.

Thanks and Regards,
Ajeet




SB Steven Britton January 15, 2009 11:08 AM UTC

What do you mean there is no event with that name? If you put a diagram control on a form, double click then look at the events in code, you will see it.

Private Sub Diagram1_ControlRemoved(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles Diagram1.ControlRemoved

Here is another quick question. what should happen when the system executes the following:
Diagram1.View.FitDocument
What happens is it makes it so small that you have to zoom in ALOT to be able to see anything.



AM Ajeet M Syncfusion Team January 16, 2009 09:38 AM UTC

Hi Binary,

Thanks to you for bringing this issue relating to the FitDocument() method under the Diagram.View.

The FitDocument() method under View is a defect, and we shall look into this and fix this at the earliest.

For now, you can use the Diagram1.FitDocument() that fits the document perfectly.

Thanks and Regards,
Ajeet



Loader.
Live Chat Icon For mobile
Up arrow icon