Crainiate Community

Support and discussion for users of Crainiate component software products
Welcome to Crainiate Community Sign in | Join | Help
in Search

How to know if anything changed on the diagram

Last post 09-28-2007 10:08 AM by laurian. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 09-27-2007 12:43 PM

    How to know if anything changed on the diagram

    Hi,

    I would like to know how to know if the user of my program has changed anything on the diagram (eg moved, deleted shapes...) since the last Save(): I would like, when closing the app to ask the user if he wants to save the diagram if he made changes since the last time he saved.

    Thanks for any help!

    Laurian 

    • 213.139.4.250
  • 09-27-2007 10:42 PM In reply to

    Re: How to know if anything changed on the diagram

    Hi,

    You can use the ElementInvalid event of the Diagram/Model control to set a flag indicating something has changed. Reset this flag when you call Save.

     

    Filed under:
    • 81.156.199.203
  • 09-28-2007 1:09 AM In reply to

    • Richie
    • Top 25 Contributor
    • Joined on 04-10-2006
    • Posts 3

    Re: How to know if anything changed on the diagram

    The only issue with this technique is that the Element::ElementInvalid and Model::ElementInvalid events are raised whenever an element is selected with the cursor.  But I guess it depends on what the developer considers an "edit".

    • 198.102.62.250
  • 09-28-2007 10:08 AM In reply to

    Re: How to know if anything changed on the diagram

    Thanks, that works! :)
     

    • 213.139.4.250
Page 1 of 1 (4 items)