LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically place cursor in textbox at startup

Solved!
Go to solution

Hi guys:)

 

On the image below you can see a small piece of my FP. It's a part of a bigger FP for a quite huge test of electronics. Each circuit board got its own serial number made of barcode. I got a reader for this that is connected to my keyboard. So when I read the barcode the numbers will come up in the textbox on my FP, IF i click the textbox first. Then the user only has to press START to do the test. My problem, or wish if you like, is that when the program starts, or is finished with a test, the cursor/marker is placed in the textbox so I only have to read the barcode.

 

Right now the user has to click in the textbox before reading the barcode. Is there any way that this can be done by Labview?

I haven checked property node yet, because I'm busy with other things right now at work. Just writing this in my break.

UI.png

 

Thanks for any help!

 

P.S I might would have found the answer in the forum, but I'm from Norway and not all the computer language is easy to translate since I use Norwegian windows. I belive it's called cursor or marker though.

 

Regards,

Even

 

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 1 of 7
(4,615 Views)

Hi emyh,

 

It could be done using property nodes, or maybe even by using an event structure that would run once the test has been complete.

I hope this link will help you:  Event Structures  

 

Regards,

John McLaughlin
Academic Account Manager
National Instruments UK & Ireland
Message 2 of 7
(4,611 Views)
Solution
Accepted by topic author EvenDeejay

Hi,

The property node "KeyFocus" attached here brings the cursor automatically into the textbox.  Set the "Val(Sgnl)" to blank to trigger the event associated with this text box (if required).

 

Hope this helps.

 

 

Place cursor.jpg

 

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 3 of 7
(4,604 Views)

Thanks alot! Both of you:)

 

I accept the last post as solution since I only got Base Develop system and cannot use event structure, which is a bummer >.<

 

But you're both right so thanks alot:) I'll look into it later on, and put it into my program.

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 4 of 7
(4,599 Views)

Something else you may want to try (nothing to do with placing the cursor) ...

 

Programme your barcode scanner to append a 'carriage return' to the end of the scan. All of the barcode scanners I've used have this ability, generally a programming booklet, or even available on the net on the manufacturers website. Then link your start button to a carriage return.

 

This way scanning the barcode starts the test.

 

 

Sebster.

Message 5 of 7
(4,580 Views)

Thanks for the tip, Sebster! Nice nudget indeed!

Regards,
Even
_________________________________
Certified LabVIEW Associate Developer

Automated Test Developer
Topro AS
Norway
0 Kudos
Message 6 of 7
(4,529 Views)

@sebster wrote:

Programme your barcode scanner to append a 'carriage return' to the end of the scan. All of the barcode scanners I've used have this ability, generally a programming booklet, or even available on the net on the manufacturers website. Then link your start button to a carriage return.

 

This way scanning the barcode starts the test.


The problem with that solution can be that the scanned code hasn't registered before activating the Start. That's happened to me. The solution was to move the key focus to the start button to make sure the text field got a Value Change event.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(4,506 Views)