LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Null array elements not grayed out

Hi all.

 

Is there a way to make null elements appear coloured like no-null elements in an array (not grayed out)? I want all the elements (already introduced and null) to have the same colour.

 

I attach you two snapshots: first, is the array with all null elements (all are grayed out), this is what I don't want; second, you have the same array, with several elements introduced, and the remaining are null, but they appear like the first ones (this is the desired behaviour, but in the image there's a trick, since the last elements are filled with spaces).

 

Thank you very much,

Francisco

Download All
0 Kudos
Message 1 of 7
(4,656 Views)

Hi Francisco,

 

Initialize the array with default values of the desired length. For your VI it looks like you'd have to initialize the array with 5 elements.

As long as the array size is shorter the unused elements will be grayed out.

 

Hope this helps,

Daniel

0 Kudos
Message 2 of 7
(4,634 Views)

Hi, Daniel.

 

Thanks for your fast reply.

 

Well, actually, I tried this option first, but I want these unused elements to remain like that: unused. I want to change only the colour.

 

Any other suggestion?

 
Thanks,

Francisco

0 Kudos
Message 3 of 7
(4,603 Views)
What's the application for that? maybe there's another solution, not involving the color change
Rodrigo Cuenca
www.cidesi.com

0 Kudos
Message 4 of 7
(4,598 Views)
Hi, Rodrigo.

The way it works is pretty simple. I only want to change a cosmetic detail. The user has to define a set of devices for the application. Each device corresponds with each array element. At first, the list is empty and the user has to write a name and choose an option for every element. Maybe it'd be clearer for him/her if every register (element) is not grayed out, because the first impression is like you cannot modify anything.

Thanks,
Francisco
0 Kudos
Message 5 of 7
(4,591 Views)
I don't see an option for that, but why don't you initialize all the array with empty strings, if the problem is that you want to know which elements have data, you can check it with "Empty String?" or "Search 1D Array".
Rodrigo Cuenca
www.cidesi.com

0 Kudos
Message 6 of 7
(4,579 Views)

Hello Francisco,

 

I do not exactly know how you are working with the array. As Daniel and Rodrigo pointed out the null elements will appear grayed out. However, if the user must introduce Strings from the Front Panel and you know the number of devices he must enter, maybe you can use the function 'build array' with String controls. In this way you will get active String controls on the Front Panel (not grayed out). Can this be useful to you?

 

Regards. 

0 Kudos
Message 7 of 7
(4,543 Views)