But I'm not getting it, I'm using the following link:
private void Comercial_Load(object sender, EventArgs e)
{
foreach (Control ctl in tabControl1.Controls)
if(ctl is TabPage)
{
((DevExpress.XtraEditors.TextEdit)(ctl)).ReadOnly = true;
((TextBox)(ctl)).ReadOnly = true;
}
xtraTabPage1.PageVisible = false;
xtraTabPage2.PageVisible = false;
xtraTabPage3.PageVisible = false;
xtraTabPage4.PageVisible = false;
}
however when running, and returned the error:
Additional information: Can not convert an object of type 'System.Windows.Forms.TabPage' to type 'DevExpress.XtraEditors.TextEdit'.
After our friend's comment, I tried again, but still unsuccessfully:
foreach (Control ctl in xtraTabControl1.Controls)
if (ctl is TextEdit)
{
((TextEdit)(ctl)).Enabled = false;
}
Thanks