Try turning it into a text box....
Will not give away the farm but try something like this...
public bool ReadOnlyOpt
{
get
{
return ReadOnlyActual;
}
set
{
if (value != ReadOnlyActual)
{
if (value)
{
base.Enabled = false;
base.Visible = false;
ctlTextBox = new TextBox ();
ctlTextBox.Text = base.Text;
ctlTextBox.ReadOnly = true;
base.Parent.Controls.Add (ctlTextBox);
ReadOnlyActual = true;
}
else
{
if (ctlTextBox != null)
{
base.Visible = true;
// The following two statements are necessary to prevent a .NET positioning bug
// that comes into play if the containing panel had been scrolled since
// the combobox had been hidden. The two statements must occur after
// the Visible flag is set true;
base.Left = ctlTextBox.Left;
base.Top = ctlTextBox.Top;
// end of special logic to prevent .NET bug.
base.Parent.Controls.Remove (ctlTextBox);
ctlTextBox = null;
}
base.Enabled = true;
base.Visible = true;
ReadOnlyActual = false;
}
}
}
}
public bool ReadOnlyActual = false;
}
Brian Hanf
www.trailblz.com