LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to disable one single element in a 2D array?

Hello,

I would like to disable one element in a 2D array. its size is constant at least.
I can change its value by using a 1D array of cluster, but I can't use the property mode easily to disable an element.

If you have any idea, it will be great.

Thank you for your help.

Lolopuf
0 Kudos
Message 1 of 9
(4,080 Views)

Array elements all must be the same so you can not grey out just one, you can use a cluster inplace of a fixed array, or decouple the array and write it to several indicatior and gray out just one.  Why do you want to gray out just one element of an array, this will help in picking out the work-arround.

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 9
(4,061 Views)
Hi Lolopuf,

you cannot set properties for just one element of an array - all elements will have the same properties, only differing in their value!

You can do:
- convert your array to a cluster, now you can set properties of single elements.
- make an event structure, catch all value change|key press|mouse events to avoid the user to change the value of this special element
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 9
(4,056 Views)
in fact, my 2D array represents the following: the row are the number of participant and the columns are their tests to be done. This is done in a state machine.
once a test is over i wanted to disable the boolean to show the user the test is done to avoid to make it twice. ( there are 16 participants and 12 tests-> so a 12x16 array)
0 Kudos
Message 4 of 9
(4,055 Views)
Two ideas:

Use a multicolumn listbox instead of an array to hold this data. It will actually look much nicer and more professional, and you can disable individual items in the listbox. You could even add symbols next to items, such as a checkbox when the test passes for a participant.

Or you could have two 2D arrays instead of one. The first 2D array holds the tests to run, and the second displays the completed tests. This takes up more room, but efficiently breaks up the workflow for the user.
Jarrod S.
National Instruments
Message 5 of 9
(4,041 Views)
I  will try this way, the first solution seems quite more optimized, you re right.

thank you all for your help.
0 Kudos
Message 6 of 9
(4,032 Views)

Hi

 

I'm actually trying to do this. Right now I have a cluster of two controls and I would like to figure out a way to gray out one of them. I was wondering if this is possible or if there is a work around.

 

Thank you

0 Kudos
Message 7 of 9
(3,392 Views)

Right click on the particular control you want to disable and change the properties on that.  To do it programmatically, create a reference for that specific control and set the Disabled property for that.

 

Message 8 of 9
(3,388 Views)

Thanks very much!

0 Kudos
Message 9 of 9
(3,383 Views)