Arrows on Every Segment

Hi Jake,

I need help on this protected function:

I derived a class from GoLink to be able to add arrows on every segment.
where I override the GoLink.CalculateArrowhead
and GoLink.DrawArrowhead. this worked 100%. after requests from my users to implement code to add ports to my lines I changed my class to inherit from GoLabeledLink
instead of GoLink to be able to add the ports to the GoLabeledLink, to get hold of the GoLink in goLabeledLink I point to RealLink to draw the Arrows on every segment but this is where my code broke.

When I changed the code to look at the GoLabeledLink’s RealLink, my code fell over at this point:

  Me.RealLink.CalculateArrowhead(a2, m2, True, myArrowPointPoly)
Me.RealLink.DrawArrowhead(g, view, Pens.Black, Me.Brush, True, 0, 0, myArrowPointPoly)

Error 108 ‘Northwoods.Go.GoStroke.Protected Overridable Sub DrawArrowhead(g As System.Drawing.Graphics, view As Northwoods.Go.GoView, pen As System.Drawing.Pen, brush As System.Drawing.Brush, atEnd As Boolean, offsetw As Single, offseth As Single, poly() As System.Drawing.PointF)’ is not accessible in this context because it is ‘Protected’. C:\DesSoft Development\01 Code\PID 2.0 With Anchor in Links\DGMUtilities2\DGMSymbols\GoDGMLink.vb 83 15 DGMUtilities

How can I draw my arrowheads via RealLink?

Thanks in Advance.

Simple… create a GoLink class that has the arrowhead drawing behavior, then create that link in an override for CreateLink in your GoLabeledLink class.

I am missing something,
i can only find a CreateRealLink
override in the GoLabeledLink the GoLink class got the DrawArrowhead behavior and the CreateRealLink in in the GoLabeledLink returns the GoLink class?

right… override CreateRealLink… and return the GoLink derived class that has your special arrowheads.

Lamp thanks - work 100%. awesome control - keep it up. Cool