Creating and Managing Menus
Menus provide an easy way for your users to execute logically grouped commands. The Menu Designer enables you to easily add a menu - either predesigned or custom tailored - to your form. You add a menu component to the form, open the Menu Designer, and type menu items directly into the Menu Designer window. You can add or delete menu items, or drag and drop them to rearrange them during design time.
You do not even need to run your program to see the results; your design is immediately visible in the form, appearing just as it will during runtime. Your code can also change menus at run time, to provide more information or options to the user.
This chapter explains how to use the Menu Designer to design menu bars and pop-up (local) menus. It discusses the following ways to work with menus at design time and runtime:
- Opening the Menu Designer
- Building Menus
- Creating Submenus
- Editing Menu Items in the Object Inspector
- Switching Between Menus at Design Time
- Using Menu Templates
- Saving a Menu as a Template
- Manipulating Menu Items at Run Time
- Merging Menus
- Importing Resource Files
For information about hooking up menu items to the code that executes when they are selected, see Associating Menu Events with Event Handlers.