How do I stop the creation of new links, but still allow relinking of the existing links?
I’ve played with OnLinkRelinked() and OnLinkCreated() but can’t stop the creation of a new link.
Also set View.NewLinkPrototype = null with no effect.
Setting View.AllowLink = false, disables both creating new links and re-linking.
Thanks
walter
2
I’m not sure why you cannot set GoView.NewLinkPrototype to null. That sounds like a reasonable relaxation of rules.
In any case, you can disable drawing of new links while allowing continued relinking of existing links by removing the tool that draws new links:
goView1.ReplaceMouseTool(typeof(GoToolLinkingNew), null);
That worked great, thanks Walter.
Now I need to restore the linking behavior. Using
goView1.ReplaceMouseTool(typeof(GoToolLinkingNew), new GoToolLinkingNew());
does not work. So, how would I restore the ability to create new links? Do I have to recreate the View?
Thanks
Jack
Jake
4
You can’t replace what you’ve removed.
try
goView1.MouseMoveTools.Insert(0, new GoToolLinkingNew());