LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

enter to move between controls

Is it possible to move between numeric controls by pressing the enter key? I want to type in a number then press enter to move to next filed. I know it can be done with tab, but enter is preferred for my users.
0 Kudos
Message 1 of 4
(3,850 Views)
The quick answer is yes. You can move to a control from a control using the enter key... but you only can do the following method once unless you are willing to do some extensive programming. What you can do is create two controls. Right click on the second control and goto Advanced>>Key Navigation. Set the navigation to the enter key. Place these controls in a while loop with a stop button and run it. Enter a value in the first control and then select "Enter". This will move the key focus to the second control. Unfortunately you can't assign multiple controls the key navigation of "enter". Is there a reason you want to use the enter key? Another solution would be to maybe use a table. After each entry you can hit enter and it will go to the next field just
like in excel. Hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 4
(3,848 Views)
Another possible solution is to use an event structure and watch or the key in any control. When you see the key, set the key focus property for the next control. A bit clunky, especially if you have a lot of controls, but it does work.

Rob
0 Kudos
Message 3 of 4
(3,848 Views)
Hello
I had the same problem. My solution can you see in the attachement.

1. I build a array with references to all my controls where i want to move.
2. In a event structure i catch the key down event from all my control. If the pressed key 28 (Enter) then i search the actual control in my array (i use the label.text for comparing, because the references have not the same value). I set the focus to the next element in the array.

I hope you understand my booring English 😉

CU
Elmi
0 Kudos
Message 4 of 4
(3,713 Views)