08-16-2011 03:00 PM
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…
Solved! Go to Solution.
08-16-2011 03:36 PM - edited 08-16-2011 03:36 PM
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
08-16-2011 04:26 PM
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.
08-16-2011 04:37 PM
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.
08-16-2011 05:37 PM
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.
08-17-2011 11:09 AM
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!
08-17-2011 11:22 AM
Thanks. This works great! I really appreciate your help.