LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

limit array selection

I am wondering if there is any way to limit an array control so that the user can only put information into a certain number of spots. What I mean is: I have an array of clusters that ask for certain configuration controls from the user. However there can only be 8 different configurations per array. I can't find a way to keep the user from editing more entries than 8. (This is purely for ease of use, as it is the program will discard anything past the 8th entry).

 

Attached is a picture of the control that I want to limit the user from selecting 9 or more entries on.

 

 

0 Kudos
Message 1 of 4
(2,604 Views)

My  first thought is that you could solve this problem by building a XControl where you make you own control for the index of the array element. This index could be limited to 8 as the maximum. Within the XControl you update the visible element of the array according to data change of the new index control.

 

Jörn

0 Kudos
Message 2 of 4
(2,601 Views)
It would be more compact if you were to use an XControl, but you don't have to use an XControl. You could, for example, hide the index display for the array, and provide your own control for selecting the element to edit. You can then use the data range properties on this control to set your limit of 8. When the user selects a specific element you can set the visible element, as mentioned in the previous reply.
0 Kudos
Message 3 of 4
(2,582 Views)

That's true.

 

I am currently developing a larger application which gets easily crowded with little features of this sort. With the XControl it is hidden in the event structure of the XControal and can easily reused. But it is much more work to get into XControls so it might not be appropriate for small applications.

0 Kudos
Message 4 of 4
(2,559 Views)