Menus

Creating Submenus

In the Menu editor, you will notice that when you press the < and > buttons, dots will appear before the selected item. These show what item belongs to what. For example:

&File
....&Open
....&Save
....&Insert...
........&Text
........&Image
....&Close
&Help
....&About
<< Top Menu
<< Menu item of File
<< Menu item of File
<< Menu item of File
<< Sub Menu of Insert
<< Sub Menu of Insert
<< Menu item of File
<< Top Menu
<< Menu item of Help

So, to create a sub menu, simply follow these steps:

1) Select Tools | Menu Editor

2) Create a menu item which you want to contain the sub menu (which will have the > after it) i.e. Insert on the File menu

3) Insert an item after the menu item you have just created. (i.e. after Insert...). Click Insert:

4) Enter the text to be displayed for the sub menu item in the Caption text box (i.e. Text). As always you can use the & to set the Shortcut key: So &Text would display the menu item Text.

5) Enter a name for the menu item. This will be used when accessing the menu's properties in your code.

6) Press the > button until the item is indented once more than the menu you want to contain a sub menu. You will see four dots (....) appear before the text Open. This shows that Open is a sub menu item on the menu item Insert:

6) Click OK. If you have used the examples, you will now see something like this when you click on File:

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Programs must be written for people to read, and only incidentally for machines to execute.”