LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically bring the cursor to a numerical control while VI running

Does anyone know how to programatically move the cursor to a particular numerical control while a VI is running?

 

I have a VI that polls the user for information, and at one point, the user has to repeatedly type numbers into the same numerical control and press enter. For a number of reasons, it is awkward to be messing with the mouse during this particular test. Each time the user presses a paricular button to send data a to file (which I have linked to the Return key on the keyboard by means of 'key navigation'), I would like the cursor to jump to the relevant numerical control ready for the next number to be entered on the keyboard. Does anyone have any ideas how to do this?

 

I have set up a separate key navigation for thenumerical control in question, so if the user presses the Esc key, this control becomes active and the cursor is in place, but I would like to move the cursor there without this extra user button press if at all possible. 

 

Regards,

 

Will

0 Kudos
Message 1 of 3
(2,173 Views)

Will

 I'm not sure if this is what you are looking for but it might do what you need. Smiley Wink

On the block diagram right click the control in question >>create>>property node>>key focus. Now right click the property node and select Change to write. Wire a boolean true constant to it and place this snippit in the appropriate place(s) in your code depending upon your architecture.

 

Hope this helps.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 2 of 3
(2,171 Views)

GovBob,

 

That was a fast response, and a very helpful one. That works. I never thought of using property nodes in that way, as I thought a simple true wouldn't be enough to tell the key navigation what to do.

 

Thanks a million for that.

 

Will

0 Kudos
Message 3 of 3
(2,167 Views)