Today, we will discuss about How to Disable Controls in Tab Control using C#.net?
private static void DisableControls(Control.ControlCollection ctls, bool disable) { foreach (Control ctl in ctls) { ctl.Enabled = disable; DisableControls(ctl.Controls, disable); } } public static void DisableTab(TabPage page, bool disable) { DisableControls(page.Controls, disable); } private void btnAction_Click(object sender, EventArgs e) { DisableTab(tabPage1, false); btnAction.Enabled = true; }
Happy Coding!
No comments:
Post a Comment