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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Locking a diagram so nothing can be moved

Thread ID:

Created:

Updated:

Platform:

Replies:

77002 Oct 6,2008 10:48 AM Oct 8,2008 09:37 AM Windows Forms 3
loading
Tags: Diagram
Ron Alan Sawyer
Asked On October 6, 2008 10:48 AM

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?


Ron Alan Sawyer
Replied On October 6, 2008 11:22 AM

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


Administrator [Syncfusion]
Replied On October 8, 2008 12:34 AM

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!


Ron Alan Sawyer
Replied On October 8, 2008 09:37 AM

Thanks, your way is easier than mine was!


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;