Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Begin node edit via mouse, keypress combo (Read 2109 times)
Chris M
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 17
Joined: Oct 7th, 2014
Begin node edit via mouse, keypress combo
Oct 7th, 2014 at 7:31pm
Print Post  
I am trying to start in-place editing of a node via the below code, however, it's not working and in the debugger e.MouseButton always equals None.  Can you please advise? Thanks.

Private Sub diagram_NodeSelecting(sender As Object, e As NodeValidationEventArgs) Handles diagram.NodeSelecting
        If (e.MouseButton = MouseButton.Right AndAlso My.Computer.Keyboard.AltKeyDown) Then
            diagramView1.BeginEdit(e.Node)
        End If
    End Sub
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Begin node edit via mouse, keypress combo
Reply #1 - Oct 8th, 2014 at 7:46am
Print Post  
MouseButton is only reported for click and double-click events, so you could start editing from NodeClicked handler:

Code
Select All
Private Sub diagram_NodeClicked(ByVal sender As System.Object, ByVal e As MindFusion.Diagramming.NodeEventArgs) Handles diagram.NodeClicked
    If (e.MouseButton = MouseButton.Right AndAlso My.Computer.Keyboard.AltKeyDown) Then
        diagramView1.BeginEdit(e.Node)
    End If
End Sub 



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