Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Custom LinkTextStyle ? (Read 1992 times)
Rich Cassell
Junior Member
**
Offline


I Love MindFusion!

Posts: 63
Joined: Sep 19th, 2012
Custom LinkTextStyle ?
Jul 16th, 2014 at 11:13am
Print Post  
Hello,

I'm using labels on our links and have been trying to find a way of displaying information in an efficient way. I've been through the enumeration entries for LinkTextStyle and none really cater for what we need and I wondered how simple it would be to mimic the enumeration and layout the labels in my own way?

Ideally, what i'm after is a sort of "LinkTextStyle.OverLastSegment" option, which obviously isn't available. Also, some of our labels could be quite long so I wondered how i'd get multiple lines of text?

If i can't do it this way, would it perhaps be possible for me to create a borderless, transparent node that i can then use as a label? That way i am at least in control over where it is etc!

Any help or pointers will be appreciated.

Thanks!

Rich  Smiley
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Custom LinkTextStyle ?
Reply #1 - Jul 16th, 2014 at 11:21am
Print Post  
Hi,

Instead of setting Text, you could use a LinkLabel attached to last segment:

Code
Select All
private void diagram_LinkCreated(object sender, LinkEventArgs e)
{
	var label = e.Link.AddLabel("long label at last segment");
	label.RelativeTo = RelativeToLink.Segment;
	label.Index = -1; // last segment
	label.AutoArrange = true;
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Rich Cassell
Junior Member
**
Offline


I Love MindFusion!

Posts: 63
Joined: Sep 19th, 2012
Re: Custom LinkTextStyle ?
Reply #2 - Jul 16th, 2014 at 2:43pm
Print Post  
Hi Stoyan,

That's great. Works a treat! Thanks muchly Smiley

Rich
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint