"Custom" MasekdTextBox - BackColor prob

Hi,
I build a control derived from MaskedTextBox with regex matching on the content and depending whether the content is good or bad I change the back color of the the textbox. The only problem I have is that sometimes, yet not always, 1px wide of the inner border remains the old color until the textbox is hovered. So, when the textbox backcolor changes to green, there's still a 1px wait border of the previous red background. However, this doesn't happen always, only sometime. I invalidate the textbox and the base, etc. yet nothing helps to get rid of that.
Any ideas?
[586 byte] By [TomFrey] at [2007-12-16]
# 1
If you can reproduce this, please post a bug report on the Microsoft Product Feedback Center.
DavidM.Kean at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 2
This is a bug which has been fixed in post-beta 2 builds.

Personally, I recommend changing the ForeColor to red on mask rejection, rather than the BackColor, but that's just a personal preference... You will find, however, that you do not encounter this problem working with the ForeColor, plus, it's easier on the eyes. Smile

durstin at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 3

How do you know that this has been fixed? I can't find anything on Microsoft Product Feedback Center.

DavidM.Kean at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 4
Personal communication with the Microsoft PM owner of the MaskedTextBox. Sorry, I didn't find some new magic bullet website...
durstin at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms General...
# 5
durstin wrote:
This is a bug which has been fixed in post-beta 2 builds.

Personally, I recommend changing the ForeColor to red on mask rejection, rather than the BackColor, but that's just a personal preference... You will find, however, that you do not encounter this problem working with the ForeColor, plus, it's easier on the eyes. Smile


Personally, I think on a control with > 50 textboxes a light pink background color is easier to notice and on the eyes as red on white ;) MaskRejection doesn't work here because I extended the control to use regex to match strings and color it accordingly.
Thanks for the heads up ,)
TomFrey at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms General...