Why is the ability to add an Event Handler grayed out when I add an item to the main menu?

I’m trying out the latest 2015 version of Xojo on Windows, and making a desktop app, I added a FileOpenFile menu item to the FileMenu in the MainMenuBar.

Unlike a button on my main window, I can not add an Event Handler because absolutely every item is grayed out in the Add to “FileOpenFile”… menu.

Why is that?

You do not add code to a menu items. You add menu handlers in windows, container controls and controls. In these menu handlers you then add your code.

Select the window in the navigator (Window1 for example).
Go to the property inspector on the right of the screen.
Under Menu Bar choose the menu you have created.
Then right click on the window in the navigator and choose “Add to Window1” and select “Menu Handler”.
Choose a menu item in the property inspector (or enter its name).
Enter your code in the source code editor.