Creating Menu Strips and Tool Strip Menu Items

You can create a MenuStrip at design time in the same way that you create any control: by dragging it from the Toolbox onto the design surface. Once added to the design surface, an interface for creating tool strip menu items appears. You can type a string into the box in the menu strip to create a new tool strip menu item. After a new item has been created, additional boxes appear to the right and beneath the newly created tool strip menu item to allow you to create more items or sub-items of the first item. This interface disappears if you move the focus elsewhere in the designer, but you can make it reappear by clicking the tool strip menu item. The ToolStripMenuItem control design interface is shown in Figure 4-3.

Toolstripmenu
Figure 4-3 The ToolStripMenuItem control design interface

Note that the default naming scheme for the ToolStripMenuItem control is different from the default naming scheme for other controls. Although controls such as Button are appended with a number when added to the form (such as Button1), tool strip menu items are prepended with the text of the menu item. For example, if you created a File menu item, the default name would be FileToolStripMenuItem. You can rename a menu item by changing the Name property in the Properties window.

Was this article helpful?

0 0

Responses

  • Robert
    Where is the tool stip meanu item?
    8 years ago

Post a comment