I want to handle the enable/disable of controls when the program starts.
Specifically, I want to find controls within a tab control. Somehow I have to use a 2-level tab control.
If you have tab controls within tab controls and in turn multiple levels of tab controls within them, you'll likely have to manually process the attached routine multiple times.
(controls of tab of tab of tab of tab ...............)
Is there a way to use it recursively?
Or is there any other good way?
Solved! Go to Solution.
Recursion would probably be the best.
The attached VI is functionally the same as your original; but simplified and cleaned up.
You can get all controls recursively using the scripting method "Traverse for GObjects.vi" (it also works in the runtime engine for VIs that have a front panel):
Here I added a filtering to eliminate controls that are sub-elements of other controls (such as elements of cluster/array/map/set/refnum…).
Thanks all for comments.
I was surprised about "Traverse for GObjects.vi".
Can you introduce useful codes for some general purposes?