Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Several Questions (Read 1785 times)
mjweyland
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: Apr 2nd, 2007
Several Questions
Apr 2nd, 2007 at 1:56pm
Print Post  
I have several questions, if this is best split out to separate posts just let me know and I can split them out.

Question 1.  How do I prevent a flowchart box from making recursive arrows?  Initially I wanted to trap this on the arrowcreating event of the flowchart but without knowing the destination box of the arrow this is not trappable.  I then added code to the arrowcreated event and am removing it from the arrows collection but the arrow is still showing on the form.

Question 2:
How would one clone a flowchart to be able to add it to a tab control with all of the events and their respective methods available to the newly created flowchart control?

Any help on this would be greatly appreciated.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Several Questions
Reply #1 - Apr 2nd, 2007 at 2:11pm
Print Post  
Hello,

1. Set FlowChart.AllowRefLinks = false.

2. You can clone the flowchart properties by calling fc1.LoadFromString(fc2.SaveToString()). You will need to manually attach the event handlers to the second flowchart though...

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


I love YaBB 1G - SP1!

Posts: 37
Joined: Apr 2nd, 2007
Re: Several Questions
Reply #2 - Apr 2nd, 2007 at 2:22pm
Print Post  
Thanks!!  This is what I was looking for. 

Can you clarify a little on the how I would manually attach event handlers to the second flowchart?

secondly, I am still having an issue when the arrow is removed from the flowcharts arrows collection that it still visible on the flowchart.  How do I visibly remove the arrow from the flow chart in addition to removing it from the arrows collection.

Thanks again for your prompt response.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Several Questions
Reply #3 - Apr 2nd, 2007 at 3:10pm
Print Post  
Hi,

Assuming you use C#, you can copy the relevant code from the form's InitializeComponent method. For each event that you handle, VS adds a

flowchart.EventName += handlerMethod;

statement to InitializeComponent. Copy all these statements to a new method, pass the flowchart object as a parameter, and call the method for each new flowchart that the application creates.

You can call FlowChart.DeleteObject to remove an arrow. That will remove the arrow from FlowChart.Arrows and FlowChart.Objects, and will create an undo/redo record for the operation.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint