LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Returning Cursor to Text Control

Solved!
Go to solution

I have a VI in which a user will be running a test and entering a serial number for each run.  This involves a text control for the serial number, and a button to start the test.  What I want to have happen is for the user to enter the serial number and then hit Enter, which would run the test and then place the cursor back in the serial number field for the next test.  I'm not sure how to go about doing this, however.  I tried setting the focus field in the button's key navigation to Return, but this requires the user to hit Enter twice and then place the cursor back in the serial number field.  I tried setting the toggle field on the button and the focus field on the text control to Return as well, and this did do as I expected but only the first time around - when the cursor returned to the serial number field this action would not repeat when a new number was entered.

 

It seems like there should be an easier way to do this, but I'm not quite sure.  I'll try to get an example of what I'm trying to do uploaded, but at the moment the rest of the VI is a bit of a mess and I would like to extract just the relevant parts.

 

Thanks for any input.

0 Kudos
Message 1 of 4
(2,818 Views)
Solution
Accepted by topic author linuxpyro

Here is an example with an event structure.  The boolean is set up to toggle when Return is pressed, and the Serial # string is configured to update while typing.  I just assumed you wanted the control erased in between tests, if not remove the two writes to the Value property (the first is just to make sure the value is read before it is blanked).

 

 

Message 2 of 4
(2,806 Views)
Thanks, that pretty much did it (though I'm not using an event structure for the rest of the program). 
0 Kudos
Message 3 of 4
(2,773 Views)

Thanks.

 

You Example, help me!! 

0 Kudos
Message 4 of 4
(2,265 Views)