Page 209 - Open Soource Technologies 304.indd
P. 209

Unit 9: Menus and Dialog Boxes




























                                            Figure 9.1: The Menu Editor.

               9.1.2 Using the List Box in the Menu Editor
               The menu control list box (the lower portion of the Menu Editor) lists all the menu controls for
               the current form. When you type a menu item in the Caption text box, that item also appears
               in the menu control list box. Selecting an existing menu control from the list box allows you
               to edit the properties for that control.
               For example, Figure 6.1 shows the menu controls for a File menu in a typical application. The
               position of the menu control in the menu control list box determines whether the control is a
               menu title, menu item, submenu title, or submenu item:
                  • A menu control that appears flush left in the list box is displayed on the menu bar as a
                    menu title.
                  • A menu control that is indented once in the list box is displayed on the menu when the
                    user clicks the preceding menu title.
                  • An indented menu control followed by menu controls that are further indented becomes
                    a submenu title. Menu controls indented below the submenu title become items of that
                    submenu.
                  • A menu control with a hyphen (-) as its Caption property setting appears as a separator
                    bar. A separator bar divides menu items into logical groups.


                              A menu control cannot be a separator bar if it is a menu title, has submenu
                              items, is checked or disabled, or has a shortcut key.



               9.1.3  To Create Menu Controls in the Menu Editor
                  1. Select the form.
                  2. From the  Tools  menu, choose  Menu Editor –or– Click the  Menu Editor button on the
                    toolbar.
                  3. In the  Caption text box, type the text for the first menu title that you want to appear on
                    the menu bar. Also, place an ampersand (&) before the letter you want to be the access key


                                      LOVELY PROFESSIONAL UNIVERSITY                        203
   204   205   206   207   208   209   210   211   212   213   214