Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Show text at the end side of link (Read 2216 times)
Ada
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 6
Joined: Mar 13th, 2014
Show text at the end side of link
Mar 13th, 2014 at 8:58pm
Print Post  
I want to show link.text on the end of the link, i.e, on the arrow side. But I can't do it with all the available textstyle. I also tried the linkLabel with no luck.

Would you please help me with that.

Thanks.

Ada
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Show text at the end side of link
Reply #1 - Mar 14th, 2014 at 8:26am
Print Post  
You can implement that using a LinkLabel like this:

Code
Select All
var endLabel = new LinkLabel
{
    Text = "this is the end",
    RelativeTo = RelativeToLink.ControlPoint,
    Index = -1,
    AutoArrange = true
};
link.AddLabel(endLabel); 



Negative Index value signifies a control point relative to the last one, where -1 is the last point. Set AutoArrange to automatically adjust the label so that it does not overlap nodes.

Alternatively, with AutoArrange disabled you could set label's position manually via the HorizontalOffset and VerticalOffset properties if you need it placed at a specific position. Offsets are relative to the point specified via Index and RelativeTo, e.g. the link's end point in this case.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Ada
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 6
Joined: Mar 13th, 2014
Re: Show text at the end side of link
Reply #2 - Apr 7th, 2014 at 9:18pm
Print Post  
Thanks Stoyan,

That is exactly what I need.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint