Arrows on Corners

I got 2 Questions:

1) How can I place Arrows on the GoLinkLabel corners.
2) Is it possible to make a arrow to move along the line with my mouse and place it anywhere on the linkline ( not only ToArrow and FromArrow)

You should be able to use GoStroke’s CalculateArrowhead to compute the polygon, and DrawArrowhead to draw them. Override Paint to add the extra arrowheads.

Moving them is a little tougher, since if you just “draw” them, instead of them being real GoObjects… you don’t have an object to bounds check on when the mouse goes down for the drag.

Hmmm. I guess if you just need 2 additional arrowheads, you could use GoLabeledLink’s FromLabel and ToLabel as holders for real GoPolygons. In that case, you’d use CalculateArrowhead to compute the points, but they would draw themselves. and then you could add a handler to drag the arrowheads.

The Processor sample has draggable link labels… steal that code and change it to only allow movement along the link.

you should also look at TwoColorLink in Demo1/(4.0) NodeLinkDemo.

Thanks for the response Jake, I am using the GoLabelLink and not the GoLink Class and notice that the functions:
is not exposed in GoLabelLink.
if i try:
'Me.RealLink.CalculateArrowhead(a2, m2, True, myPoly) 'Me.RealLink.DrawArrowhead(g, View, Pens.Black, Me.Brush, True, 0, 0, myPoly)
I get and error DrawArrowhead is protected.Please advice.

Create a subclass of GoLink that does the arrowheads as you want them, then override CreateRealLink() in your GoLabeledLink class and create your new “real link”.