I'm trying to change the forecolor for the textbox on focus (custom control)
protected override void OnEnter(EventArgs e)
{
base.OnEnter(e);
BackColor = this.Parent.BackColor;
ForeColor = _OnFocusForeColor;
}
but how to back to the original color of the forecolor?
I tried:
protected override void OnLeave(EventArgs e)
{
base.OnLeave(e);
BackColor = Color.WhiteSmoke;
ForeColor = this.ForeColor;
}
but doesn't work!