LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a keyboard shortcut in labview 7.1?

How do you implement keyboard shortcuts in LabView 7.1?  (IE, to select a certain tab in a Tab Control, or to perform a certain task).  All I come up with when searching is either stuff for 8.0, or editting shortcuts.
 
Thanks.
0 Kudos
Message 1 of 5
(3,290 Views)
I think the only way before LV 8 is to create a custom runtime menu bar and associate actions with the custom commands.  A few good examples of this are in the shipping examples (search for menu) and at:

http://sine.ni.com/apps/utf8/niepd_web_display.display_epd4?p_guid=D7A365EDA31A2572E034080020E74861


2006 Ultimate LabVIEW G-eek.

0 Kudos
Message 2 of 5
(3,284 Views)
You can not actually select a certain page on a tab control using a shortcut. In LabVIEW 7.1, you CAN set up Key Navigation. Right click on the control (the tabs for a Tab control) and select Advanced -> Key Navigation... On the left you can select what key you want to activate this control. The key choices are fairly limited, though. If you select a Tab control in this way, you can then use the right and left arrow keys to select different tabs.

You can set up Key Navigation to go to a specific control on a tab page and the key will take you straight to that tab page. Warning that you will activate that control when you do this. You can set up a hidden button that does nothing on a tab page and use Key Navigation to get to that page.

I figure that this is not exactly what you were looking for, but it's what LabVIEW 7.1 has. Your other choice is to set up a run time menu (as has already been suggested).

     Rob
0 Kudos
Message 3 of 5
(3,272 Views)

That may suit my needs.  I'll play around with this a bit and see what I can do.  Thank you both for your input.

--
Sean

0 Kudos
Message 4 of 5
(3,251 Views)
If you're looking to use a keyboard shortcut to navigate to a certain tab in a tab control, I would use the event structure.  Watch for "Key Down" event on the entire VI, and inside that event-handling case check to see if it's your preferred keyboard shorcut. If so, change the value of the tab control to show the page you would like.  You can take any behavior you want in response to this (or any other) key combination.

J

Jason King
LabVIEW R&D
National Instruments
Message 5 of 5
(3,229 Views)