The code base is DataSetDemo. I have 2 nodes and I tried to link them together by dragging from node1 to node2. I always get the default basic link. I have a special link class called routelink. I tried to overide goView.OnLinkCreated. Here is my code:
The code has no error. But it does not help either. I still get the default basic link. Any suggestion? Thanks a lot.
The easiest thing to do is to set GoView.NewLinkPrototype when you initialize the GoView. It needs to be set before the user starts drawing a new link.
If you don't want users to always create instances of the same link class, there is discussion of this topic in the FAQ. Search for "I want to decide dynamically what kind of link to create".
Setting GoView.NewLinkPrototype works! Thank you so much.