LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

limit array size on GUI

I have an array of clusters on the front panel. I want to limit the number of elements in the array the user can edit. For example, I want the user to be able to see and edit items in indicies 0-11, but I do not want the user to be able to edit or see elements greater than 11. Is there a way to limit the range of indicies a user can see at runtime?
0 Kudos
Message 1 of 11
(4,514 Views)
You can customize the index control to an enum with just 11 values. to do this, customize your array. Once you get to the customize sceen, select the index and try to customize that. then replace it with an enum. and fill its values from 1-11. this way, you can have only 12 values.
Message 2 of 11
(4,512 Views)
Thank you for the suggestion. I went to customize the array and then the index. In customizing the index I replaced it with a fixed element enum as suggested. Unfortunatly when I tried to apply the changes it was unsuccessful. There was no error message just a beep. I will try other data types, but I am open to additional suggestions. Thank you.
0 Kudos
Message 3 of 11
(4,512 Views)
Indeed you can't replace the index with a enum, but a ring works very well.


LabVIEW, C'est LabVIEW

Message 4 of 11
(4,512 Views)
I am sorry. what i had in mind was ring.
0 Kudos
Message 5 of 11
(4,512 Views)
I used the ring and it works great. Thank you for the help.
0 Kudos
Message 6 of 11
(4,513 Views)

I have exactly the same situation.  However, I'm not sure how to customize the array so as to replaced it with a fixed element ring?  Each time I try, the entire array (not the index) gets replaced with a ring.

0 Kudos
Message 7 of 11
(4,255 Views)

I would like to know how to do this as well.  I was not able to make this work.  As this was a post from 2003, the functionality may have changed.  However, you can control the array in many other ways.  One is just hiding the increment / decrement and displaying only the desired elements.  The other is to use property nodes to deny / allow access to the desired elements.

 

Let me know if you have on any questions on how to do this.

 

Thanks!

 

Dan

Daniel Eaton
National Instruments
Systems Engineering
Embedded and Industrial Control
0 Kudos
Message 8 of 11
(4,229 Views)

You can also handle this with the event structure, on mouse up check the new index prop node and re write it with the coersed value.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 11
(4,223 Views)
Another way: Size your array to the size to display/edit and make the index display invisible. Go to Vi properties and disable the shortcut menues at runtime (so users can't make the index diplay visible again). Propably you can also modify the pop-up menu under LV 8 or later.
You can even programmtically change the array portion to display/edit using property nodes.

Felix
0 Kudos
Message 10 of 11
(4,208 Views)