Port's Label invisible

Hello

In the CreateIcon method of my node (derived of GoGeneralNode):

  1. I have setted the label of a port.
  2. I added the port to a group.
  3. I return this group

All is displayed correctly except the text of port label, some idea?

PS:
I don’t use AddLeftPort or AddRightPort, because I must set some special positions for ports)

Ports normally do not have labels. GoGeneralNodePort does have a label (a GoGeneralNodePortLabel), but such ports are expected to be managed by GoGeneralNode as left or right ports. The corresponding labels are then positioned by GoGeneralNode.LayoutChildren and GoGeneralNodePort.LayoutLabel to be next to the ports.
If you are adding one or more ports to a group that you have as the Icon of the GoGeneralNode, then that’s fine, but it can’t be managed by GoGeneralNode as if it were a left or right GoGeneralNodePort. So you should just create your own GoText to act as the label for your extra port, and add it to and position it in the group that is your Icon. Remember to make it not-Selectable.

Thanks for ultra-fast answer.

Is there a way to add a port at left or right side, but without GoGeneralNode automatic positionning ?
It will do the same as I am trying to do…

You can Add whatever GoObjects you want to the GoGeneralNode, and then position/size them as you wish in an override of LayoutChildren. That’s true for GoPorts as well as GoTexts. You’ll probably want to position children relative to the Icon, or relative to some other child that is positioned relative to the Icon.