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

Unit 9: Menus and Dialog Boxes



               For example, if the Edit menu shown in Figure 9.2 is open, the following Caption property
               settings respond to the corresponding keys.

                    Menu control caption          Caption property           Access keys
                        Cut                       Cu&t                           t

                        Copy                      C&opy                          o
                        Paste                     &Paste                         p
                        Delete                    De&lete                        I
                        Select All                Select &All                    a
                        Time/Date                 Time/&Date                     d


                              Do not use duplicate access keys on menus. If you use the same access key
                              for more than one menu item, the key will not work. For example, if C is
                              the access key for both Cut and Copy, when you select the Edit menu and
                              press C, the Copy command will be selected, but the application will not carry
                              out the command until the user presses ENTER. The Cut command will not
                              be selected at all.

               9.2.2 Shortcut Keys
               Shortcut keys  run a menu item immediately when pressed. Frequently used menu items may
               be assigned a keyboard shortcut, which provides a single-step method of keyboard access, rather
               than a three-step method of pressing ALT, a menu title access character, and then a menu item
               access character. Shortcut key assignments include function key and control key combinations,
               such as CTRL+F1 or CTRL+A. They appear on the menu to the right of the corresponding menu
               item, as shown in Figure 9.3.

















                                             Figure 9.3:  Shortcut Keys.

               9.2.2.1 To Assign a Shortcut Key to a Menu Item
                  1. Open the  Menu Editor.
                  2. Select the menu it em.
                  3. Select a function key or key combination in the  Shortcut combo box.
               To remove a shortcut key assignment, choose “(none)” from the top of the list.


                                      LOVELY PROFESSIONAL UNIVERSITY                        205
   206   207   208   209   210   211   212   213   214   215   216