Typically, your application will contain Clicked scripts for each menu item in a drop-down or cascading menu. For example, the script for the Clicked event for the Open menu item on the File menu opens a file.
The Clicked event is triggered whenever:
The menu item is tapped with a stylus (or clicked with a mouse on the desktop)
The shortcut key for the menu item is pressed
The menu containing the menu item is displayed and the accelerator key is pressed
A pop-up menu displays
Using the Clicked event on Windows CE platforms The Windows CE platform does not allow the Clicked event on top-level menu items. For example, script that you place in the Clicked event for the File menu is not triggered on the Windows CE platform, although the same script is triggered in the Clicked event for the File>Open menu item.
The Clicked event for a menu item can be triggered 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 a user taps the menu item with a stylus. The drop-down or cascading menu displays after the Clicked event is triggered. If the menu item does not have a menu under it, the script for the Clicked event is executed when the stylus is lifted.
Using 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.