Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic SegmentCount (Read 2835 times)
Jens Evers
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Feb 5th, 2007
SegmentCount
Feb 5th, 2007 at 11:09am
Print Post  
I'm not able to increase the number of segments of an existing arrow.

[code]

MindFusion.FlowChartX.Arrow arrow;
// node1 and node2 both exists
arrow = FlowChart.CreateArrow(node1, node2);
// Style is Cascading
// SegmentCount is now 2
arrow.SegmentCount = 5;
// SegmentCount is unchanged and still 2
[/code]

The created arrow is drawed correctly, but i cannot increase the number of segments. I want to add some control points. After calling [i]UpdateFromPoints()[/i], all control points are correct and visible! But only the first segments of the arrow are drawed, because the number of segments is unchanged! And i cannot change the number of segment manually (see example)! Only if i move the origin or destination node/box, all segments of the arrow are drawed completely.

Best regards,
Jens Evers
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SegmentCount
Reply #1 - Feb 5th, 2007 at 11:26am
Print Post  
You cannot change the number of segments if Arrow.AutoRoute is enabled. Could you check what's the AutoRoute value for your arrow?

Best regards,
Stoyan
  
Back to top
 
IP Logged
 
Jens Evers
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Feb 5th, 2007
Re: SegmentCount
Reply #2 - Feb 5th, 2007 at 12:24pm
Print Post  
Okay! AutoRoute was enabled during setting SegmentCount! With the following code, it works fine!

[code]

MindFusion.FlowChartX.Arrow arrow;
// node1 and node2 both exists
arrow = FlowChart.CreateArrow(node1, node2);
// Style is Cascading
// SegmentCount is now 2 (for example)
arrow.AutoRoute = false;
arrow.SegmentCount = 5;
arrow.AutoRoute = true;
// SegmentCount is now 5
arrow.ControlPoints.Clear();
// p1 ... p6 are given control points for the 5 segments!
arrow.ControlPoints.Add(p1);
arrow.ControlPoints.Add(p2);
arrow.ControlPoints.Add(p3);
arrow.ControlPoints.Add(p4);
arrow.ControlPoints.Add(p5);
arrow.ControlPoints.Add(p6);
arrow.UpdateFromPoints();
[/code]

Thanks for your prompt reply!
Jens Evers
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint