3 Replies Latest reply on Jun 10, 2010 11:50 AM by Joe ... Ward

    Scrolling stage.nativeWindow.menu on Windows

    munkeymike

      Two questions:

       

      1. How can I enable mouse wheel scrolling on native drop down menus on Windows? Air automatically creates arrows that allow me to move up and down the list, but scrolling would be much more efficient and works perfectly in OS X.

       

      2. When I enter a character while the menu is open it jumps immediately to the first NativeMenuItem starting with that character. If I enter a string of characters, it jumps to each one of those individually, as opposed to the string itself. How can I enable it to jump to the string? Again, it works in OS X.

       

      Thanks for the help!

        • 1. Re: Scrolling stage.nativeWindow.menu on Windows
          Joe ... Ward Level 4

          This just works differently on different OS's -- but that's the point of the native menu API, you get the normal OS behavior.

           

          From the docs:

          Mnemonics are part of the operating system keyboard interface to menus. Linux, Mac OS X, and Windows allow users to open menus and select commands with the keyboard, but there are subtle differences.

           

          On Mac OS X, the user types the first letter or two of the menu or command and then presses the return key. The mnemonicIndex property is ignored.

           

          On Windows, only a single letter is significant. By default, the significant letter is the first character in the label, but if you assign a mnemonic to the menu item, then the significant character becomes the designated letter. If two items in a menu have the same significant character (whether or not a mnemonic has been assigned), then the user’s keyboard interaction with the menu changes slightly. Instead of pressing a single letter to select the menu or command, the user must press the letter as many times as necessary to highlight the desired item and then press the enter key to complete the selection. To maintain a consistent behavior, you should assign a unique mnemonic to each item in a menu for window menus.

           

          On Linux, no default mnemonic is provided. You must specify a value for the

          mnemonicIndex property of a  menu item to provide a mnemonic.

          • 2. Re: Scrolling stage.nativeWindow.menu on Windows
            munkeymike Level 2

            Ah ok. I was assuming it was just an OS difference.

             

            What about the scrolling of menus? Same issue? I have a huge list in a menu and it's just a pain to get where you need to in Windows.

            • 3. Re: Scrolling stage.nativeWindow.menu on Windows
              Joe ... Ward Level 4

              Again, that's OS behavior, not really AIR behavior. You don't have control of it in an AIR app.