07-03-2023 08:49 PM - edited 07-03-2023 08:53 PM
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?
labmaster.
Solved! Go to Solution.
07-03-2023 09:53 PM
Recursion would probably be the best.
The attached VI is functionally the same as your original; but simplified and cleaned up.
07-04-2023 10:32 AM - edited 07-04-2023 10:39 AM
Hi,
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…).
Regards,
Raphaël.
07-05-2023 06:34 AM
Thanks all for comments.
I was surprised about "Traverse for GObjects.vi".
Can you introduce useful codes for some general purposes?
labmaster.
07-05-2023 07:01 AM