0

Hey, I'm trying to change the color of a textbox border say if a value returned false.

    private void UserBox_TextChanged(object sender, EventArgs e)
    {
        ControlPaint.DrawBorder(e.Graphics, this.ClientRectangle, Color.Red, ButtonBorderStyle.Solid);
    }
}

the problem is EventArgs e doesnt have a graphics member, EventArgs should be a PaintEventArgs, but when i change its paramters i get an error. perhaps im doing something in properly or dont have the correct textbox. how would i get this to work

1
Contributor
1
Reply
3
Views
5 Years
Discussion Span
Last Post by grh1107
0
 private void UserBox_TextChanged(object sender, EventArgs e)
        {
            Graphics UserG = UserBox.CreateGraphics();
            ControlPaint.DrawBorder(UserG, this.ClientRectangle, Color.Red, ButtonBorderStyle.Solid);
        }

Solved

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.