Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Creating new controlpoint via sourcecode (Read 1722 times)
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Creating new controlpoint via sourcecode
Aug 3rd, 2006 at 11:10am
Print Post  
Hello, itīs me again  Wink

I try to add a new controlpoint/segment to an existing arrow when the user clicks on the arrow.
My sourcecode:
Code
Select All
tmpArrow = Me.FlowChart1.GetArrowAt(Pt, 1, True, segNo)
tmpArrow.ControlPoints.Insert(segNo + 1, Pt)
tmpArrow.UpdateFromPoints()
 



After doing this the arrow consists of 2 segments, but the second one is not visible. I get one segment from arrow-startpoint to new control point (in origin arrow style) and a second one from new control point to arrow-endpoint (line ist not visible - just the arrowhead is there).

Another question: how can I check if an existing controlpoint ist hit by mouseclick?

Any idea?

Thanks,
Dirk
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Creating new controlpoint via sourcecode
Reply #1 - Aug 3rd, 2006 at 12:16pm
Print Post  
Hey, it's you!!!  Grin

There isn't any nice way to insert control points. First you must increase the SegmentCount property, but that resets the current arrow shape to a straight line, so you must keep a copy of the old control point positions.

Take a look at the MouseMove handler here:
http://mindfusion.org/cgi/Forum/YaBB.pl?board=fcnet_disc;action=display;num=1152...

Just change points.Add(point); to points.Insert(..., point);

- glavcho
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Creating new controlpoint via sourcecode
Reply #2 - Aug 3rd, 2006 at 12:29pm
Print Post  
Call the HitTestHandle method to find out whether any control point is hit.

HTH
  
Back to top
 
IP Logged
 
Dirk Woelfel
YaBB Newbies
*
Offline



Posts: 17
Joined: Jun 26th, 2006
Re: Creating new controlpoint via sourcecode
Reply #3 - Aug 4th, 2006 at 10:00am
Print Post  
Thank you,

works fine! Great support!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint