LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Show/Hide certain items in an array of clusters

Solved!
Go to solution

I am trying to figure out how to programmatically show/hide certain items in a cluster (specifically an array of clusters).  I tried a couple of things but nothing worked for me.  On a similar note, I would like to be able to programmatically hide certain columns in a table.  I can’t figure it out and the postings on the LabVIEW forums here were either not terribly helpful for my situation or maybe I just didn’t understand them.  I have attached a vi where I tried to hide items within the array of clusters.  Maybe someone could point out why it didn’t work and hopefully they could provide a solution or direction for me to follow.  Thanks in advance…

0 Kudos
Message 1 of 7
(4,922 Views)

If you create the Visible property nodes from the string controls from the front panel, you can accomplish what I think you are trying to do.  You can figure out the logic for the other cases.

 

If you look at the array of control refs in your code (with a probe), you will find it empty.

 

Lynn

 

Visible.png

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

Thanks for the quick reply.  I did notice that the control ref array was empty, but I am not sure why that is the case.  I will see if I can use the method you have employed.  I could see it becoming cumbersome if I get a lot of items in my cluster, but it might work well.

0 Kudos
Message 3 of 7
(4,902 Views)

Simply use property nodes that are linked to the controls in the cluster (right-click on the string control then create property node.

Attached VI does what you want.

Message 4 of 7
(4,895 Views)
Solution
Accepted by topic author cycleguy

Creating a property node directly to the cluster element is far easier. pcardinale essentially shows this.

 

As for the question regarding the table columns, there is no direct way to hide the table columns, viz-a-viz Excel. The closest you can get is to set the column width to zero, as shown in attached example.

0 Kudos
Message 5 of 7
(4,886 Views)

Your table column-hiding solution works well enough for my application.  I had known that there was some way to adjust the column width, but I couldn't figure out how to do it.  Thanks!

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

Thanks.  This works great!  I really appreciate your help.

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