Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic problem creating arrows (Read 1957 times)
drevel
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Mar 26th, 2006
problem creating arrows
Jun 9th, 2006 at 9:59am
Print Post  
hi again, after ax working perfectly, im trying to do a simple diagram, with 2 types of boxes locked to allow only moving then vertically,  using "LeftInRightOut" style :

................................[cboxSc]
[cboxSe]..................[cboxSc]
................................[cboxSc]

and creating arrows programatically with this code:

ArrowItem arr=m_FlowChart.CreateArrow(cboxSe,cboxSc);

arr.SetStyle(asPerpendicular );

arr.SetSegments(3);

arr.SetCtrlPtX(1, 630);

arr.SetCtrlPtX(2, 630);

arr.Update();

arr.SetAutoRoute(FALSE);

this create an arrow between the left cboxSe and the right box cboxSc, the code works perfectly when the two boxes are side by side,

[cboxSe]...............[cboxSc]

but if the boxes are in diferent vertical levels:

...............................[cboxSc]
............................................
[cboxSe]..............................

then the arrow is created bad, diagonally not with "asPerpendicular" style, after that, if I move the boxes with the mouse vertically, then the arrow is draw correctly, really, when I start moving the right box, the righ portion of the arrow (from the defined point at 640) changes from diagonal to perpendicular as it should be, and so on when moving the left box.

may be I'm doing something wrong, or is there any way to "refresh" the arrow to get it corretly draw after creating it without moving the boxes? thanks
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3444
Joined: Oct 19th, 2005
Re: problem creating arrows
Reply #1 - Jun 9th, 2006 at 12:13pm
Print Post  
If the first segment of the arrow is vertical, maybe you should use SetCtrlPtY for the second segment to keep it horizontal ? Or try setting PrpArrowStartOrnt to soHorizontal before calling CreateArrow; this should ensure that the firt segment is horizontal, and so the second one is vertical.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint