Port label should be between the segmented link


I have the following situation:

Port has a label and this label should be between the segmented line (see the picture below, GoDataflowOutputSignalPort).
I have done this by setting label BackgroundColor, and TransparentBackground to false. But if I place some background image on the node, label covers that part of the image.

My question is, how to segment the line into two pieces and place the port label between?

Thanks in advance.

Similar question asked here, and all we came up with then was the background trick you are already using.

Oh, I see.
Is there a chance to implement this functionality into a some further release of GoD?

Well, it hasn’t been on our list.

This is a Port label as opposed to a GoLabeledLink? You could, with overrides, make the connecting point for the port be the end of the label (where the “t” is in “…SignalPort”. and then (as part of the Port or Node drawing) draw in that little bit of the link on the node side of the label.

Actually, if I look at the port labels in GoGeneralNode, that’s how it is already implemented. (except it puts the label up next to the port, so there is no final little segment between the label and the port icon)

Yah, I found GoGeneralNodePort and it’s methods: " GetLinkPoint(int spot)" and "GetToLinkPoint(Northwoods.Go.IGoLink link). So overriding them I should get what I want.

Thanks for the help Jake Tongue

Hello again Jake,

I haven’t figured out how to override methods “GetLinkPoint(int spot)” and “GetToLinkPoint(Northwoods.Go.IGoLink link)” to meet the requirement above.
Please, can you give me some example code to accomplish this task?

Thanks in advance.

Let me be sure of my facts:

Are you using GoGeneralNode? Or have you created your own GoPort class with a label?

Hi Jake,

Finally, I found the solution how to connect the line with my custom GoPort with label by overriding the “GetFromLinkPoint” method. It is much better solution than setting the port label color into white and put it in the separate layer above link…

Thanks anyway.

Glad you figured it out. As usual, with GoDiagram, there’s always a way…