PyCMenu.EnableMenuItem

int = EnableMenuItem(id, flags )

Enables, disables, or dims a menu item.

Parameters

id : int

Specifies the command ID of the menu item. This parameter can specify pop-up menu items as well as standard menu items.

flags : int

Specifies the action to take. It can be a combination of MF_DISABLED, MF_ENABLED, or MF_GRAYED, with MF_BYCOMMAND or MF_BYPOSITION

Comments

The PyCMenu::CreateMenu , PyCMenu::InsertMenu, PyCMenu::ModifyMenu, and PyCMenu::LoadMenuIndirect member functions can also set the state (enabled, disabled, or dimmed) of a menu item.