Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ArrowCreated (Read 1328 times)
Cliven yong
Guest


ArrowCreated
Aug 8th, 2006 at 5:04am
Print Post  
Dear Sir

I have some problem during ArrowCreated Event.
When this event fire try to execute below the code
FC.Arrows.Remove(e.Arrow)

FC doesn't remove the arrow in the UI and still allow me to select the arrow. If after select the arrow and press delete button. FC raise a error

An unhandled exception of type 'System.ArgumentException' occurred in mscorlib.dll

Additional information: Cannot remove the specified item because it was not found in the specified Collection.

Please reply me asap

Thank you
Cliven

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ArrowCreated
Reply #1 - Aug 8th, 2006 at 6:02am
Print Post  
Dear Cliven,

Call fc.DeleteObject(e.Arrow) to delete the arrow. Otherwise you would have to remove the arrow from several more collections - fc.Objects, origin_node.OutgoingArrows and destination_node.IncomingArrows. DeleteObject also creates an undo/redo record and repaints the flowchart.

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