LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Key focus problem

I think the problem was that the VI was not set to show front panel when opened. He was using a property to show the front panel and this was set after the key focus was set. Setting key focus without the front panel open does not make much sense. The fix to set to dialog will open the front panel first and then set key focus. Setting key focus without having the front panel open is doing things in the incorrect order.
Message 11 of 14
(1,174 Views)
Thanks guys for fixing my problem.

0 Kudos
Message 12 of 14
(1,162 Views)

This "problem" still exists even in LabVIEW 2010SP1. I stumbled upon this post searching for a solutions. I have a subvi which is set to "Show Front Panel when Called" however even with setting the keyfocus for a string control to TRUE the property does not work.

 

I noticed that I had set my subvi's window appearance to "Floating". Changing this to Modal fixed my problem. Not sure why NI doesn't allow Keyfocus to be called when the VI is Floating but there's probably a reason however obscure.

 

Craig

Message 13 of 14
(871 Views)

I also noticed that putting key focus property nodes just after Dialog Boxes can cause this problem to happen as well. Placing a small wait time (~5ms) immediately after the timer helps with this problem.

Message 14 of 14
(759 Views)