DesktopMenuItem.AutoEnabled
From Xojo Documentation
Property (As Boolean )
aDesktopMenuItem.AutoEnabled = newBooleanValue
or
BooleanValue = aDesktopMenuItem.AutoEnabled
New in 2021r3
Supported for all project types and targets.
or
BooleanValue = aDesktopMenuItem.AutoEnabled
New in 2021r3
Supported for all project types and targets.
If set to True, the DesktopMenuItem is enabled by default, as long as the App object or frontmost window has a menu handler for the menuitem.
Notes
There is no need to put code in the MenuBarSelected event handler to explicitly enable an autoenabled menu item. AutoEnabled is True by default. When you create dynamic menus by creating a new class based on DesktopMenuItem, AutoEnabled is also True by default. See the example on dynamic menus on the DesktopMenuItem page.