"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]
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. 
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.  |
|
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 ,)