Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Disable all child objects/components on a panel

I have a panel containing labels, buttons, memo’s, etc. and I want every component to be disabled on that panel, individually (i.e., Enabled is false).

I want the components to be disabled individually (and not just the panel itself to be disabled) to show the person using my program that the objects are there but cannot be used (they are greyed out because the Enabled property is false).

Is there a quicker way of disabling all of them at once, instead of changing the Enabled property to false for each component?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Is there a quicker way of disabling all of them at once, instead of changing the Enabled property to false for each component?

The fastest way is to just disable the Panel itself, but you ruled out that possibility. So no, there is no other way. You must loop through the Panel’s components and disable them one at a time.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading