LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determin wich control has focus

I'm using arrow keys to drive an external device. I catch the main vi key events and act on it. On this vi is also a textinput. When I navigate true is input with arrow keys the main vi events are also fired. That of course should not happen. Is there a way to distinguis between such events. Thus between a vi's main keyboard events and keyboard events in a control on this vi. I thought of finding out wich control has focus.?
0 Kudos
Message 1 of 4
(2,892 Views)
For each control and indicator there is a property, "Focus". When it is True, the control / indicator has the key focus.

-Joe
Message 2 of 4
(2,892 Views)
Still the main vi events are fired. When the key focus is set to a certain control does that mean that this control is the first to handle the events? If so, can you keep them from passing trhough to the vi?

JOhan
0 Kudos
Message 3 of 4
(2,892 Views)
Sometimes when you dialog controls, the last "OK" button added to the front panel has the focus turned on by default. You can right click on the control and select "Customize >> Key Navigation" and select "None" in the list.

It seems you have a different problem and are using event structure. Nomally we use the "Value Change" as event condition. Is it possible that you may choose a different condition, such as "Key Down, Key up, etc"?

-Joe
0 Kudos
Message 4 of 4
(2,892 Views)