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

Key "control" + mouse moved on diagrams''node.

Hi,

I am actually using Essential Studio 2009 7.4.0.20 for Windows Forms.

I would like to prevent the following behavior within the diagrams’nodes:
After selecting a node, how to prevent key control + mouse moved to create a copy of the selected node?

Thanks for your answers.

Regards.




After KeyControl_90f4b003.rar

3 Replies

JB Jaffersathick B Syncfusion Team May 31, 2010 09:36 AM UTC

Hi Fabien Campagne,

Thank you for contacting Syncfusion Support.

You can prevent copying a node by pressing ctrl+ drag drop of the node by canceling the event in NodeCollectionChanging event.

[C#]

this.diagram1.Model.EventSink.NodeCollectionChanging += new CollectionExEventHandler(EventSink_NodeCollectionChanging);

void EventSink_NodeCollectionChanging(CollectionExEventArgs evtArgs)
{

Keys modkey = Control.ModifierKeys;
if (modkey == Keys.Control)
{
evtArgs.Cancel = true;
}

}



Please try this and let me know if this helps.

Regards,
Jaffer.B


FC Fabien Campagne May 31, 2010 01:18 PM UTC

Hi,

Thanks for your helps.

I'm working with 2 kinds of nodes:
- FilledPath (as shown in my example)
- ControlNodes

The sample code you sent me works properly with FilledPath. Besides, it doesn't work with ControlNodes.

Is there a logical reason for this behavior?

Regards



After key_5cf3867f.rar


JB Jaffersathick B Syncfusion Team June 1, 2010 05:25 AM UTC

Hi Fabien Campagne,

Thanks for the update.

I tried the same behavior in our dashboard sample and the reported issue does not occur. Please have a look at the sample and if the issue still exists, could you try reproducing it in the above sample and send us the modified sample, so that we could sort out the cause of the issue and provide you a solution.


CS.zip


Regards,
Jaffer.B

Loader.
Live Chat Icon For mobile
Up arrow icon