Hey guys! I want to change the default new link from a GoLink object to a GoLabeled link. I add in new links that are derived from the GoLabeledLink class, and I just want the new ones that people draw to be of my new class.
Link : GoLabeledLink so when I have the new links drawn I would like them to be of this new class. Right now I have it set to add in a new Link on top of the original, but I just want to start out with my new link right off the bat. Or is there a way I can delete the original link right after I add my new link right on top of it?
Set GoView.NewLinkPrototype to be an instance of whatever link class you want to be copied each time the user draws a new link. (Actually, when the GoToolLinkingNew tool calls GoView.CreateLink, which makes the copy.)
For your programming convenience, there are two GoView properties that cast the GoView.NewLinkPrototype value as either a GoLink or as a GoLabeledLink. Since your prototype link will be a GoLabeledLink, you can refer to the prototype via the GoView.NewGoLabeledLink property.
WOOT!!!
[code]
goView1.NewLinkPrototype = new Link();
goView1.NewGoLabeledLink.Pen = new Pen(Color.Turquoise, 2);
goView1.NewGoLabeledLink.HighlightPen = new Pen(Color.White, 6);
goView1.NewGoLabeledLink.ToArrow = true;
[/code]
this sooo works!!! Thanks Walter!!!