This project has moved and is read-only. For the latest updates, please go here.

Permissions of a shape

Feb 8, 2012 at 10:36 AM

Hi,

I downloaded version 1.0.7 two days ago and liked it very much.

I read the help file and tested the example solutions provided in the msi file.

I have a question about the permissions of a shape:

I want the user only to move the shape. I don' t want the user to resize or rotate the shape.

Is it possible in NShape?

-Best regards.

-Yavuz

Feb 9, 2012 at 2:35 PM

> I want the user only to move the shape. I don' t want the user to resize or rotate the shape.
> Is it possible in NShape?

The permission system is not that fine-grained by default. But you can easily derive your own shape class from any of the base-classes in the core assembly "Dataweb.NShape.dll" or from the specific shape classes in the shipped shape libraries.
In your derived shape class, you can

  • override the "GetControlPointCapabilities" method so no control point is a Resize-Control point
  • override the Properties that define the size

See "Concepts / Shapes", "Programmer Tasks / Developing a new shape class" and "Reference / NShapeLibraryInitializer Class" in the documentation.

Best Regards,

Kurt

Feb 10, 2012 at 8:31 AM

Hi Kurt,

I will try your suggestion.

Thank you very much.

-Best regards.

-Yavuz