LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set focus to a control

good evening

I have the attached VI which accepts 3 types of information fro user,
the problem is that to write into the first field (ie: Eng COde...)
i have to click on it with the mouse( it gets focus), manually and then to input the inforamtion

my question is , how to cause this field to be focus already when the VI is executing
in order to ovoid the need for mouse click..just be ready for the input data

thank in advance
Simon.I
0 Kudos
Message 1 of 9
(7,765 Views)
You'll have to convert the Express VI to a normal VI. Right click and select Open Front Panel. With it converted, you can create a Key Focus property node for the control.
0 Kudos
Message 2 of 9
(7,757 Views)
I will file a bug report to have the Express VI changed. In the meantime, you will have to do as Dennis suggests; i.e convert the Express VI and edit it. Insert a property node for the first control between the FP.Open and the while loop and set property KeyFocus to true.
0 Kudos
Message 3 of 9
(7,748 Views)
Thanks,
Since i am new to LBV can you tell me how to do this?
simon.i
0 Kudos
Message 4 of 9
(7,739 Views)
After you place the VI on the block diagram, right click on it and select "Show front panel". LV will ask you if you want to convert the VI. Click "convert". Go to the block diagram of the VI and right click the control you want. Select Create>>Property node. A property node for that control will appear. Click where it says property and select Key Focus. Right click it and select "Change to write" and place it where it needs to be. Give the VI a name and save it.

___________________
Try to take over the world!
0 Kudos
Message 5 of 9
(7,730 Views)
thanks, i managed, it looks fine

Now, it runs ok when it runs from LBV7, but when i activate it from TS2 (normal operation)
it doesnt get focused.

please advice..
Simon.I
0 Kudos
Message 6 of 9
(7,725 Views)
thanks again
i am attaching the VI's,
as i said before, from LBV7 it runs ok ,as desired..
but from TS2 the control not focused as needed
please advice

thanks in advance
Simon.I
0 Kudos
Message 7 of 9
(7,722 Views)
Hi Simon,

I'm not sure why the VI would execute differently from TestStand than when run from LabVIEW. Did you resave the VI with a different name? Make sure that you're calling the VI with the right name from TestStand. If this still doesn't help, let us know.

Hope this helps!

Travis H.
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 8 of 9
(7,699 Views)
Hi,

You probably need to make the panel modal to TestStand window. I think there is an example in the examples folder of Teststand.

Also, you really should continue the error chain from sequence 2 on to sequence 3 and out.

regards
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 9 of 9
(7,694 Views)