Specifies code that executes when a menubar or popup is opened.

Property of

MenuBar, Popup

Description

The onInitMenu event is called whenever a menubar or popup is invoked, and is processed before the menubar's child menus or the popup is displayed.

You can use the onInitMenu event to determine the status of menu items that will be displayed. For example, use the onInitMenu event to determine if the enabled or checked property of a menu item should be true or false.