We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Locking a diagram so nothing can be moved

In my current project I have two views of my diagrams:
1. Edit/Creation view
2. Display. I do not want the user to be able to change/move controls in display mode. I would like to be able to "lock" the diagram.

How can I do this?


3 Replies

RA Ron Alan Sawyer October 6, 2008 03:22 PM UTC

Have a look at node.editstyle. It has several properties to allow and disallow movement, resizing etc.



AD Administrator Syncfusion Team October 8, 2008 04:34 AM UTC

Hi RAS,

Yes, its very much possible for having the digram control behave just in the way you desire, i.e workable, when in edit mode; and disabled when in the display mode.

To do this you can follow these steps:
1. Create two buttons (For interactive features)

2. Label them, "Edit Mode" and "Display Mode"

3. Add the following line of text into the click event associated with the button labeled "Edit Mode":

diagram1.Enabled = True;

4. Add the following line of text into the click event associated with the button labeled "Display Mode":

diagram1.Enabled = False;

Run the code to see the difference.

PS: Dont forget to post you experiences!

Happy Coding!



RA Ron Alan Sawyer October 8, 2008 01:37 PM UTC

Thanks, your way is easier than mine was!


Loader.
Live Chat Icon For mobile
Up arrow icon