Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Behavior select only (Read 2356 times)
digit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Jul 23rd, 2008
Behavior select only
Jul 28th, 2008 at 7:18am
Print Post  
How do i set the diagram view behavior to select only? I need to prevent user deleting, or altering a node or link and prevent user from adding new node or link.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Behavior select only
Reply #1 - Jul 28th, 2008 at 9:41am
Print Post  
Set Behavior = Modify, and either call Cancel from the StartModifying event handlers, or set EnabledHandles = None for all nodes.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
digit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Jul 23rd, 2008
Re: Behavior select only
Reply #2 - Jul 29th, 2008 at 12:23am
Print Post  
I tried the following:

    Private Sub Diagram_NodeStartModifying(ByVal sender As Object, ByVal e As MindFusion.Diagramming.NodeValidationEventArgs) Handles Diagram.NodeStartModifying
       e.Cancel = True
    End Sub

but this still allowed a user to delete. So I added this as well:

    Private Sub Diagram_NodeDeleting(ByVal sender As Object, ByVal e As MindFusion.Diagramming.NodeValidationEventArgs) Handles Diagram.NodeDeleting
       e.Cancel = True
    End Sub

But this causes a crash.

My aim is to allow a user to select nodes only (not links) and to raise my own event from this selection, but prevent a user from moving, modifying or deleting a node.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Behavior select only
Reply #3 - Jul 29th, 2008 at 7:10am
Print Post  
Set DiagramView.DelKeyAction = None to prevent users from deleting nodes. Set Locked = true for all links to prevent users from selecting them.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
digit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Jul 23rd, 2008
Re: Behavior select only
Reply #4 - Aug 1st, 2008 at 4:19am
Print Post  
Perfect thank you.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint