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

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -