Orthogonal GoLabeledLinks


If I create an Orthoganol GoLabelLink between two nodes and position the label to be in the middle of the link, as soon as I move one of the nodes the label moves back to its original position.
How can I override this?
Many thanks
Alex Holland
Questionmark Computing Limited


First, is setting GoLabeledLink.MidLabelCentered what you want?
If not, you’ll need to override GoLabeledLink.LayoutMidLabel, or perhaps PositionMidLabel. Ultimate control is achieved by overriding LayoutChildren.


Thanks Walter for your quick reply.
I should have been clearer. When I said ‘position the label to be in the middle of the link’ I meant so that it is equidistant between the two nodes.
The problem seems to be that the middle segment of the link (to which I think the label is attached) jumps to its original position when I move one of nodes that the link is attached to.
Could this be solved by overriding PositionMidLabel?
Alex Holland
Questionmark Computing Limited


No, you’ll need to override LayoutMidLabel. PositionMidLabel is called when the segment is already determined and you want to decide how to position the label relative to the midpoint between the segment’s end points.