6.9. Serving Up Menus
Menus are very simple to insert into a form. Figure 6.14 illustrates the design of a three-level hierarchy of menu items under the title Edit. The steps to create such a menu are as follows:
Figure 6.14. Menu Design
1. |
Click on MainMenu in the Windows Forms Toolbox window (on the left in Figure 6.14) and drag it onto the form. The menu is a nonvisible control, so the icon appears below the form. (In Figure 6.14, there are four nonvisible controls.)
|
2. |
Click on the mainMenu1 icon; a Type Here box appears on the second line of the form.
|
3. |
Click on the box. Two additional Type Here boxes appear—one below the current item ... |
Get C# Primer: A Practical Approach now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.