MenuItem.Enabled

From Xojo Documentation

Revision as of 20:07, 18 December 2021 by Gperlman (talk | contribs) (Notes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Boolean )
aMenuItem.Enabled = newBooleanValue
or
BooleanValue = aMenuItem.Enabled

Supported for all project types and targets.

Indicates whether or not the menu item is enabled.

Notes

For MenuItems that belong to an App or Window menu, this property should only be set to True in the EnableMenuItems event handler.

You can set it for MenuItems created for use by contextual menus or for use with the Popup method.

Example

This example is in the EnableMenuItems event handler and it enables a menu.

FilePageSetup.Enabled = True