LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the keyboard arrow keys to navigate among controls on the front panel?

I know the "Tab" key can be used to navigate among controls, but I would like to know if there is any way to make the arrow keys do the same job.


Message Edited by roch52 on 03-13-2008 01:55 PM
0 Kudos
Message 1 of 7
(3,917 Views)

You can use the Key Down event and cycle through the controls by setting their Key Focus property to T. If you want, you can build their references into an array and index the correct element out of the array.

Alternatively, you can use the Key Down? (filter) event and if the key was one of the arrow keys you can replace it with a tab click (ASCII 9).


___________________
Try to take over the world!
Message 2 of 7
(3,911 Views)
Anyone can provide a sample Vi for this?
0 Kudos
Message 3 of 7
(3,908 Views)
Here you go. Modify as needed/desired.
Message 4 of 7
(3,898 Views)
Thanks for the sample vi. It works but not in the way that I want. For example, I have 3 controls on the front panel, namely, control 1, control 2 and control3. I want to use the "down" arraw key to navigate in the sequence control 1->control2->control3, and use the "up" key to navigate in the sequence control 3->control2->control1. Can we do that?
0 Kudos
Message 5 of 7
(3,892 Views)
Yes. If you modify it. That why I said modify as needed. Change the case selection to have one for "Up" and one for "Down" if that's the only arrow keys you're interested in. Everything else goes to "Default". On the outbound event items (the ones on the right-hand edge of the event structure) expand it and select the PlatMods.Shift. Wire out a True for the "Down" case.
Message 6 of 7
(3,885 Views)
Nice, it works perfectly. Thanks a lot.
0 Kudos
Message 7 of 7
(3,879 Views)