Graph node's port problem

sir

there is a class GoTextNode which i inherited in GraphNode class.
IN GoTextNode class there is properties like RightPort,LeftPort,–etc,
sir when i create a link from a graphnode PORT to other graphnode PORT ,how can i make link from desired PORT from FromNode to ToNode PORT?

Actually i have made a property in GraphNode Class-
public GoPort FromPort
{
get
{

            return base.RightPort;               
            
        }
       

    }

but through it,i can’t find desired port when create link?

thank you

GoTextNode has 4 ports… one on each side. Any of the 4 can be a from port or a to port.

but sir how can i detect which port is selected in graphnode?

Is any property or function is available in GoTextNode class to find selected port?

“selected” in what situation? on the mouse down of the port that starts the link?

sir in graphnode i made a property FromNode to findout selected port

but when i use base. then there is no any property which tell the actual port where selection occured.
so i have to bydefault set base.RightPort that every time takes right port.

Well, GoDiagram doesn’t have the notion of a “selected port”, other than a port that started the linking operation in GoToolLinking.

If you want to add the notion of a "port most recently clicked closest to", you can do that by overriding OnSingleClick and remembering the closest port. (Note that the GoText inside the GoTextNode also wants OnSingleClick, so I think you have to override CreateLabel and add your own custom GoText to do this.)