Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Moveable Arrow Texts (Read 2071 times)
due
YaBB Newbies
*
Offline



Posts: 27
Joined: Jun 20th, 2007
Moveable Arrow Texts
Jul 27th, 2007 at 1:54pm
Print Post  
Hi,

I use the layout algorithms of FlowChart's Pro Edition to arrange the chart layout automatically. After that the user should be in the position to adapt the chart arbitrary. That's reason why, I got the requirement to make arrow texts (without the arrow itself) movable. How can I implement this?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moveable Arrow Texts
Reply #1 - Jul 28th, 2007 at 1:15pm
Print Post  
Hi,

Use an attached box to display the text:

Box label = fc.CreateBox(...);
label.Text = "arrow label";
label.IgnoreLayout = true;
label.Transparent = true;
label.AttachTo(someArrow, AttachToArrow.Segment, 0)

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



Posts: 27
Joined: Jun 20th, 2007
Re: Moveable Arrow Texts
Reply #2 - Aug 13th, 2007 at 11:05am
Print Post  
Hi,

Thanks for the reply!

If I use an attached box for arrow texts the label (box) size will not fit to text size. The corresponding FitSizeToText method remains/consider either width, height or ratio. In fact, all three options cause word-wraps and unfitting sizes (visible by box handlers).

How can I simply resize the attached box to required text size without any restrictions?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Moveable Arrow Texts
Reply #3 - Aug 13th, 2007 at 12:37pm
Print Post  
Try setting the box size to the result of the FlowChart.MeasureString method.

Stoyan
  
Back to top
 
IP Logged
 
due
YaBB Newbies
*
Offline



Posts: 27
Joined: Jun 20th, 2007
Re: Moveable Arrow Texts
Reply #4 - Aug 13th, 2007 at 1:21pm
Print Post  
Thanks a lot, it works!

btw. I didn't found the FlowChart.MeasureString method in documentation. However, I think it would be an easy and intuitive way to provide this function via overridden (parameterless) FitSizeToText method.
Perhaps this issue is obsolete in version 5...
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint