LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

run-time menu tabbing with ALT key

Solved!
Go to solution

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?

0 Kudos
Message 1 of 9
(3,221 Views)

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.

 

menu.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 9
(3,209 Views)

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?

0 Kudos
Message 3 of 9
(3,204 Views)

@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.

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 9
(3,201 Views)

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.

0 Kudos
Message 5 of 9
(3,191 Views)
Solution
Accepted by topic author Humph

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.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 9
(3,186 Views)

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

0 Kudos
Message 7 of 9
(3,167 Views)

@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.

 

ctrla.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 8 of 9
(3,161 Views)

Jim,

I'm really happy with the sub-menu solution. My users wouldn't remember short cut keys!!!!!!

Humph

0 Kudos
Message 9 of 9
(3,158 Views)