Ide/Creating new Project Items/Creating a Menu
< Ide/Creating new Project Items
Creating a New Menu
To create and register a new menu in a project you need to use the File | New menu command. In the opened Create Project Item dialog you should select the Menu type of created item. Then the dialog will accept the following shape:
In this dialog you should specify the following items:
Name
- In the Name field you should type in the name, which will be associated with this menu in the automatically generated code. This name should be a correct Visual Prolog name. It should be any sequence of letters, digits, and underscores, beginning with a letter. This name appears as the name of the files storing the menu description (with .mnu extension). This file appears in the project tree in the Project window.
Parent Directory
- In the Parent Directory field you should type in the parent directory (the TaskWindow\ on the picture). The menu resource file will be placed into the selected directory.
Menu Attributes Dialog
After you press the OK button in the Create Project Item dialog, the Menu Attributes dialog appears.
After clicking the OK button the new menu will be created and its name will be added to the list of menus existing in the current project. You can always go back and wake up (with the Resource | Attribute task menu item or with the Attribute item from pop-up menu) the Menu Attributes dialog for the menu. The only possible setting for menu attributes is:
- Constant
- In this list edit the programmer can change the default resource constant for the menu (at the picture it is id_mymenu). A menu identifier must be unique throughout the project.
- Resourse File
- In this read-only field the programmer can see the name of the file in which the creating menu resource will be stored.