Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Arrow Line Shape and Drag and Drop (Read 2890 times)
dsmyth
YaBB Newbies
*
Offline



Posts: 9
Joined: Mar 13th, 2006
Arrow Line Shape and Drag and Drop
Apr 13th, 2006 at 11:46am
Print Post  
Hi, like to begin by saying FlowChart.NET is an amazing control, Mindfusion have done a great job with it.

Now onto the questions one of which is FlowChart.NET specific the other is a problem I'm having that I hope someone has an answer to.

Is there any way to get arrows to be retangular. Rather than a straight lines from point to point we're looking for arrows that are rectangular and would join points by having turns or kinks in them.

The other problem I'm having is this, the user drags and drops items onto the diagram, when they do this the point at which they drop the item determines the x and y co-ordinates of a table. However once the diagram gets larger the items are no longer dropped in place. They are placed as if the drop occured while the diagrams top and left is being displayed. Is there anyway to work out the offset to apply to the x and y co-ordinates depending on which part of the diagram is being displayed when the user drops an item onto the diagram?

Thanks for any response.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow Line Shape and Drag and Drop
Reply #1 - Apr 13th, 2006 at 1:39pm
Print Post  
Thanks!

You can set a thicker arrow.Pen to get a rectangular look for the arrows. E.g. try setting the pen Width to 3-4 mm. A drawback is that such arrow will be painted only in a single color, i.e. you cannot have the interior painted in one color and the outlines in another.

You could use custom drawing to fill the interior with one color and paint the outline in another one. That would be a matter of calling

Graphics.DrawLines(e.Arrow.ControlPoints)

twice, the first time using the e.Arrow.Pen to draw the outline, and the second time using a slightly thinner pen in a different color for the interior.

Regarding the drag-and-drop location - first convert the point from screen to client coordinates using fc.PointToClient, then from client to document coordinates using fc.ClientToDoc.

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



Posts: 9
Joined: Mar 13th, 2006
Re: Arrow Line Shape and Drag and Drop
Reply #2 - Apr 20th, 2006 at 6:01am
Print Post  
Thank you Stoyo!

ClientToDoc; fantastic.

This might be to do with how I explained the lines thing but thicker lines isn't what the users looking for.  We're looking not for straight lines, point to point, we're looking for a line thats square. Like in the ERM diagram of the demo (should of just of said that to begin with), how do you create lines like that.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow Line Shape and Drag and Drop
Reply #3 - Apr 20th, 2006 at 8:59am
Print Post  
Hi,

I see - these arrows have their Style property set to Cascading. You can set FlowChart.ArrowStyle to "ArrowStyle.Cascading" and all newly created arrows will be square ones.

Stoyan
  
Back to top
 
IP Logged
 
dsmyth
YaBB Newbies
*
Offline



Posts: 9
Joined: Mar 13th, 2006
Re: Arrow Line Shape and Drag and Drop
Reply #4 - Jun 12th, 2006 at 6:23am
Print Post  
Thanks again Stoyan thats brilliant!
Cheesy

(sorry for the late reply super ubber mega busy)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Arrow Line Shape and Drag and Drop
Reply #5 - Jun 12th, 2006 at 7:44am
Print Post  
8)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint