LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Customize tabbing in array

I'm using an array as a control.  I have things set up almost perfectly, except for one thing: I want to customize how the application handles tabbing through the elements of the array.  Rather than dealing with the Ctrl-up and Ctrl-down sequences to go into or out of the array, I'd like simply hitting Tab to ignore the outer array and go straight to the first element; hitting it again will go to the next element; and so on.

 

I handled this for clusters by getting references to the controls in the cluster and setting the focus to the next control, but this doesn't work with arrays.  (Each element of the array has the same reference.)  However, LabVIEW clearly has some way of setting the focus to a particular element, since it does so when you use the up and down arrows.

 

So my question is this: how can I programmatically set the focus to a particular element of an array?  I've considered sending LabVIEW the appropriate keystrokes (e.g., Ctrl-down, several down-array keystrokes, and then Ctrl-down again), but that seems clunky.  Is that my only option, or is there a more elegant method to give an element the focus directly?

0 Kudos
Message 1 of 2
(2,771 Views)

Just read your problem and want to throw an idea out here. I might have misunderstood your problem.

 

There is a property of the array called "Index Values" It is the index in the top left corner of the array. So for a 1d array, it is the element shown at the top of the visible space of the array. If you change that, you can change the portion of the array visible to a user. Just create a property node from the control's block diagram icon.

 

Without seeing your code, this is the best I can offer. I am assuming the basic array control. 

Additionally, Array Element->Key Focus may also help you if you are trying to get the user's input with that action.

0 Kudos
Message 2 of 2
(2,756 Views)