09-23-2011 04:19 AM
I have created my custom menu bar and it works fine when clicking on the menu item with the mouse.
Using the Alt key selects the first menu item, and the arrow keys navigate along the items fine, but pressing the keyboard Enter button does not select the item. The example VIs don't work either. What am I missing?
Solved! Go to Solution.
09-23-2011 05:11 AM
I see that the 1 and 2 items don't respond to the Enter key, but the a, b and c items do. Perhaps you can group your commands as I did with a, b and c.
09-23-2011 06:21 AM
Thanks for your swift response, but your solution doesn't really fit my requirements, as I would have to use the mouse to select menu item 2 before the Arrows and Enter key can be brought into play. So I may as well use the mouse throughout.
Does anyone know why the top line menu entries don't respond to the Enter key?
09-23-2011 06:37 AM
@Humph wrote:
[...] I would have to use the mouse to select menu item 2 before the Arrows and Enter key can be brought into play. [...]
No. You can use the Alt key to reach the top line menu items, then the arrows to navigate. It'll work like you described in your first post, except the deeper items will respond to the Enter key.
Perhaps I misunderstand, but it worked when I made test in that screenshot.
09-23-2011 12:03 PM
Jim,
Can I refer you to the example "Menu Selection Demo.vi" which illustrates my point. This has sub menus as you suggest. The items in the sub menus can be activated using the Enter key on the keyboard, but the top line items in the menu have to be selected by the mouse to display the sub menu.. I would like to activate these using the Enter key.
09-23-2011 03:25 PM - edited 09-23-2011 03:29 PM
Use Alt to enter the menu, left/right-arrows to navigate horizontally and the down/up-arrows to navigate the menus vertically. The first time you use the down-arrow on the top line item will open the menu below it. I just did this with the demo VI you suggested.
09-26-2011 03:22 AM
Jim,
I now realise that what I was trying to do was wrong. I was trying to get the menu items to activate WITHOUT displaying a drop-down list. Now that I have set up the menu to provide a sub menu for each item in the menu bar, I can navigate with the ALT key and arrow keys as you suggest. I have also provided a 'Cancel' option in each sub-menu so that the user can back out if required, so it is all much more user friendly now.
Thanks for your time and patience!
Richard
09-26-2011 04:32 AM - edited 09-26-2011 04:34 AM
@Humph wrote:
Jim,
I now realise that what I was trying to do was wrong. I was trying to get the menu items to activate WITHOUT displaying a drop-down list. [...]
Would a shortcut key combination work for your application? In the below case, menu item C will be triggered without activating the menu at all.
09-26-2011 04:36 AM
Jim,
I'm really happy with the sub-menu solution. My users wouldn't remember short cut keys!!!!!!
Humph