label1
A----------------------------------->B
label2
How can i achive the same for all my nodes label on the top of the Link.
Is there any property which i can set so that whenever the label created this will automatically set on the center of the link.
Thanks in advavance..
Vineet
walter
October 1, 2007, 8:50am
2
If the labels can be implemented by a single string:
GoLabeledLink link = new GoLabeledLink();
link.ToArrow = true;
GoText lab = new GoText();
lab.Selectable = false;
lab.Multiline = true;
lab.Text = "label1\n\nlabel2";
link.MidLabel = lab;
link.MidLabelCentered = true;
goView1.NewLinkPrototype = link;
If the labels really need to be independent GoText objects, you’ll need to override GoLabeledLink.PositionMidLabel to place both labels where you want them to be.