LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to tab through all elements in an array control (not just the visible elements)?

Solved!
Go to solution

You can already tab through visible elements in an array, but when you reach the last visible element, the next tab will wrap you around to the first visible element.

 

Is there anyway to tab through all visible elements?  I don't see that as an official feature.

array_wrap.png

I'm trying to code it myself.  I can filter tab keyboard events that originate from an array, detect which element is selected and then adjust the top visible element appropriately (through the 'IndexVals' property).  But I can't figure out how to move the focus to the next element (so the user can begin typing in a new value without clicking on the element).

 

Any ideas?  Thanks.

0 Kudos
Message 1 of 6
(3,620 Views)

Hi,
I think the attached Vi should do what you would like.

Let me know if this solve your problem...

Best Regards,

V-F
Message 2 of 6
(3,610 Views)

Thanks, that's perfect.  You just need to discard the tab events so they don't act twice.

 

 

0 Kudos
Message 3 of 6
(3,601 Views)

On closer investigation, it's close.  But when you have entered a value in element 'n' and press tab, it moves your focus to 'n+1' but also commits the value you entered in 'n' to element 'n+1' (and no new value is commited to 'n').  Here is slightly updated code (that filters the original tab).  Any ideas?

 

 

0 Kudos
Message 4 of 6
(3,590 Views)
Solution
Accepted by peabody_bass

I think I figured it out.  If you disable KeyFocus before you write new IndexVals, it will commit the originally typed value correctly.

0 Kudos
Message 5 of 6
(3,588 Views)

Hi,

if the solution is found, please mark this post as solved !

Best regards,

V-F
0 Kudos
Message 6 of 6
(3,571 Views)