Winform Set readonly for tablelayoutpanel C# -
i have tablelayoutpanel contains many controls. wanna lock tablelayoutpanel can copy data in fields. tablelayoutpanel has enabled property --> cannot copy data in them. please me lock tablelayoutpanel , can copy in these fields.
there's nothing in tablelayoutpanel
allows functionality.
instead, loop through controls, @ type, , set property need:
foreach (var control in tablelayoutpanel1.controls.cast<control>()) { var tb = control textboxbase; if (tb != null) tb.readonly = true; // controls textbox , richtextbox else control.enabled = false; // other controls }
Comments
Post a Comment