I am coding a C# Forms application and would like to know how to enable/disable all controls container within a panel.
Here is my code:
private void EnabledPanelContents(Panel panel, bool enabled) { foreach (var item in panel.Controls) { item.enabled = enabled; } } There is no enabled property in the panel.Controls collection.
How can I enable/disable all controls container within a panel.
Thanks in advance.
item.enabled=false