LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is a fast way to disable all sub controls?

Hey,

 

the problem is as follows: I wrote a working XControl and want to disable all Inputs if the application is not in Run Mode. One way to do this is to disable all Inputs using the "Run Mode" event, and conversely enable them. Now this is rather cumbersome, is the a way to simply address all subcontrols and disable/enable them in one step? 

 

Thank you in advance

Twerp

0 Kudos
Message 1 of 5
(2,482 Views)

Grab the Controls[] property and disable all in a loop.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(2,469 Views)

Ok, 

 

thank you. But how do I get this property from within the XControl?

 

Twerp

0 Kudos
Message 3 of 5
(2,461 Views)

You could put them into a cluster container and enable/disable the cluster.

 

Be aware that controls can be operated in edit mode even if they are diasabled, can you explain what you actually want to do?

0 Kudos
Message 4 of 5
(2,445 Views)

I most certainly can! The single controlls set up parameters of a piece of hardware that does not react until it is properly initialized, so i have to protect these inputs until this is the case. If there is a more elegant way to achieve this, please let me know!

 

Regards

Twerp

0 Kudos
Message 5 of 5
(2,437 Views)