Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic diagram.clicked vs. diagramview.mousedown (Read 3915 times)
DSspirit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Nov 3rd, 2009
diagram.clicked vs. diagramview.mousedown
Nov 4th, 2009 at 5:15pm
Print Post  
Hey,

When and how do you differentiate between using the two following click events on a diagramview? And if you want to use one instead of the other how is that done, as I've tried to replace the first with the second and the event is not registered?

Private Sub diagramview_Click(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles view3D.MouseDown

vs.

Private Sub fcx_Clicked(ByVal sender As Object, ByVal e As MindFusion.Diagramming.DiagramEventArgs) Handles doc.Clicked

I'm new to this version of MindFusion, so any help is great!

Thanks,
Dave
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: diagram.clicked vs. diagramview.mousedown
Reply #1 - Nov 4th, 2009 at 6:33pm
Print Post  
Hi,

DiagramView.MouseDown is inherited from Control and gives you client area / pixel coordinates of the mouse pointer. Diagram.Clicked has its MousePosition argument in diagram logical coordinates (specified via MeasureUnit). Also diagram.Clicked is not raised when the mouse pointer is over an item, but view.MouseDown would be raised in that case too.

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


I love YaBB 1G - SP1!

Posts: 10
Joined: Nov 3rd, 2009
Re: diagram.clicked vs. diagramview.mousedown
Reply #2 - Nov 4th, 2009 at 7:36pm
Print Post  
I am still unsure of how to use the diagram.clicked event as whenever I implement that call the diagramview does not register any action.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: diagram.clicked vs. diagramview.mousedown
Reply #3 - Nov 4th, 2009 at 7:51pm
Print Post  
Are you using DiagramView3D? I don't think you will get Diagram.Clicked in such case; it's supported only in the 2D case.
  
Back to top
 
IP Logged
 
DSspirit
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Nov 3rd, 2009
Re: diagram.clicked vs. diagramview.mousedown
Reply #4 - Nov 4th, 2009 at 8:02pm
Print Post  
Yes I am, sorry for leaving that out.  Undecided
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: diagram.clicked vs. diagramview.mousedown
Reply #5 - Nov 4th, 2009 at 8:20pm
Print Post  
You could call the view3D.GetNodeAt method from MouseDown to determine whether there's a node at the mouse position, and count it as if the diagram has been clicked if GetNodeAt returns null.

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