Menu item events

Menu items have the following events:

About the Clicked event

The Clicked event is triggered whenever:

A menu item responds to a mouse-click or the keyboard only if both its Visible and Enabled properties are set to “true”.

If the menu item has a drop-down or cascading menu under it, the script for its Clicked event (if any) is executed when the mouse button is pressed, and then the drop-down or cascading menu displays. If the menu item does not have a menu under it, the script for the Clicked event is executed when the mouse button is released.

NoteUsing the Clicked event to specify menu item properties When the user clicks an item on the menu bar to display a drop-down menu, the Clicked event for the menu item on the menu bar is triggered and then the drop-down menu is displayed.

You can use the menu bar’s Clicked event to specify the properties of the menu items in the drop-down menu. For example, if you want to disable items in a drop-down menu, you can disable them in the script for the Clicked event for the menu item in the menu bar.

About the Help event

The Help event is triggered when the user presses F1 or clicks the context Help button [?] on a window’s title bar and then points and clicks on a menu item.

About the Selected event

The Selected event is triggered when the user selects a menu item.