Skip to main content

SetMenuItemState

Description

Sets the MenuItem state individually.

Syntax

// shellFrame points here into the IShellFrame interface
await shellFrame.Commands.SetMenuItemState(menuItemId, state);

Parameters

NameOptionalityTypeDescription
menuItemIdRequirednumberMenuitem to enable.
stateRequiredCommandStateState to set to the item.

Return type

TypeDescription
Promise < void >Method does not return a value

Exceptions

ArgumentError - When menuItemId or state is null or undefined.

NotFoundError - When the menu item is not found or access is denied.