Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable deleting by Ctrl + x (Read 1817 times)
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Disable deleting by Ctrl + x
Apr 25th, 2012 at 7:59am
Print Post  
Hello,

i locked all my items in my diagram, like an readonly mode. By clicking an item i activate this item.
But the user can delete this item by pressing ctrl + x.

How can i avoid this?

Best regards
Amosius
  
Back to top
 
IP Logged
 
Amosius
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 75
Joined: Sep 2nd, 2010
Re: Disable deleting by Ctrl + x
Reply #1 - Apr 25th, 2012 at 9:19am
Print Post  
I changed
diagram.Nodes[position].Selected = true
to
diagram.ActiveItem = myItem

This works for me. Ctrl. - X has no effect now.

Amosius
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Disable deleting by Ctrl + x
Reply #2 - Apr 25th, 2012 at 10:28am
Print Post  
You could override the default Cut command binding:

diagram.CommandBindings.Add(
    new CommandBinding(ApplicationCommands.Cut, (sender, args) => {}));

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint