## Handling Menu Selection Events

The UI Designer handles most of the normal flow of event processing for you. As you add objects to your application you may specify which events the object will respond to. The UI Designer generates stub methods which will be called in response to those events.

Every menu item calls a custom menu item event handler when it is selected. The UI Designer code generator names the handler for each menu item based on the menu item name. If the menu item names are not unique across the application (Close, Close), UI Designer adds a numeric addenda to the method name to avoid naming conflicts (Close1, Close2).

#### Handling Menu Selection Events

1. Select the menu item to edit the selection handler method.

The menu item is highlighted.

NOTE You may select the menu item in either the Layout region or the Outline View.

2. Right click on the selected menu item to display the context menu.

The context menu appears.

3. Select the Handle 'selected' Event or Go to 'selected' Event item from the context menu.

NOTE You may be asked to confirm saving modified information.

The associated source file will be opened to the handler routine for this menu item's selection event.

##### Related concepts

- Standard Components

##### Related references

- Menu Editor

##### Related tasks

- Adding Menus
- Adding Menu Items
- Adding Submenus
- Deleting Menus
- Deleting Menu Items
- Renaming Menus
- Reordering Menus