07-05-2013 07:34 AM
I have a lot of elements in my front panel that I wan't to hide and show while the program is running, and while I know that I could do this by making a property node for each element I'm wondering if there is a easier and less messier way to do it? For instance a way to set the property node visibilty status for all the elements at the same time?
07-05-2013 07:39 AM
Create an array of references of your controls. You can then use a FOR loop with the property node inside to iterate through the control references.
07-05-2013 07:50 AM
Please look at a simple example I posted. This shall make *ALL* FP Controls visible/invisible based on the T/F constant wired in the for loop.
I've attached the VI in LabVIEW 2012. You will have to write some more code to customize this. You might want to extract the label of the FP control or maybe the index so you can choose which ones to hide and show.
07-05-2013 07:50 AM
Thanks a lot!
07-08-2013 08:07 AM
One way is to put the controls on a tab control, then just change the visibility of the tab control.
07-08-2013 08:20 AM
In case anybody was wondering in SK8's example vi the 'Tab Order' determines the index of the control in the array of control references so you could have an array of Boolean into the loop to show or hide specific controls.
Funnily enough The Panel Property Controls[] returns the indicators too!
Ken