Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Event on Arrow Creation? (Read 1591 times)
mattapayne
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 15
Joined: Mar 6th, 2007
Event on Arrow Creation?
Mar 6th, 2007 at 7:55pm
Print Post  
Hi,

I'm looking for a way to handle a user drawing an arrow from a node to another arrow. I don't need to join on the destination arrow, I just need to know when that particular series of events has occurred. Is there any way to achieve this?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Event on Arrow Creation?
Reply #1 - Mar 6th, 2007 at 8:10pm
Print Post  
Hi,

The "Ternary connections"  example shows something of that kind. It uses the AllowUnconnectedArrows property, which allows drawing an arrow to any point of the document, even if there isn't any node there. The ArrowCreated event handler checks whether there is another arrow at the point whether the new arrow is created by using the GetArrowAt method -

Code
Select All
private void fc_ArrowCreated(object sender, MindFusion.Diagramming.WinForms.ArrowEventArgs e)
{
	Arrow a = e.Arrow;

	// if not connected to a real node
	if (a.Destination is DummyNode)
	{
		PointF endPt = a.ControlPoints[a.ControlPoints.Count - 1];
		a.Locked = true;// so we can exclude it from the search
		Arrow trg = fc.GetArrowAt(endPt, 1, true);
		if (trg != null)
		{
			...
 



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


I love YaBB 1G - SP1!

Posts: 15
Joined: Mar 6th, 2007
Re: Event on Arrow Creation?
Reply #2 - Mar 6th, 2007 at 8:55pm
Print Post  
Thanks Stoyo, I'll look into that.

Matt
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint