NShape Programmer Tasks
Hiding Unauthorized Menu Items

<< Click to Display Table of Contents >>

Navigation:  Programmer Tasks > Customizing Context Menus >

NShape Programmer Tasks
Hiding Unauthorized Menu Items

Previous pageReturn to chapter overviewNext page

Adjust Visibility of Prohibited Menu Items

By default, all presenter components with built-in context menus show all context menu items. If the required permission to execute an action is not granted, the menu item will be disabled with a descriptive tooltip text indicating why the item is disabled.

A context menu showing all context menu items.

A context menu showing all context menu items.

If you don't like this behavior, you can easily change it:

All NShape presenter controls that create context menus provide a property "HideDeniedMenuItems". Set this property to true, and menu items disabled due to access restrictions will no longer be created.
Same context menu as above, showing only granted menu items

Same context menu as above, showing only granted menu items