Enabled/Disabled background colors not being consistent?

I have a couple of instances in which I disable some textboxes. When I do that, the background colors change (as they should). When I enable them, they show the enabled color, which is usually the default color of white. However, when I toggle them back and forth, the enabled color doesn't show again....the background color just stays white. What properties do I need to pay attention to or change.

I will say also that my application has a custom color for when the textbox has focus. This is determined by the user. When the textbox loses focus, the backcolor become white again. I have a feeling I'm just not sure which properties I should be working with.

I've attached a screenshot of what I'm talking about.
screen shotThanks
BlakeMcKennaAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CodeCruiserCommented:
Can you show the code you are using to manage your custom color?
0
David L. HansenCEOCommented:
As long as you are handling the textbox events each time they enter or leave the control, you should only have to change the color and refresh the control. I've often ran into the same issue you're describing and refreshing the control (after making the change) usually fixes the problem.
0
Éric MoreauSenior .Net ConsultantCommented:
this is not the normal behavior. your grayed textbox is surely not enabled. can you show your code?
0
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

BlakeMcKennaAuthor Commented:
I just thought of something....does making a control "ReadOnly" have an affect on the background color? If so, then that would be my issue...
0
Éric MoreauSenior .Net ConsultantCommented:
Yes ReadOnly grays the control
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jacques Bourgeois (James Burger)PresidentCommented:
A TextBox that is disabled can have its BackColor changed through code.

My feeling is that your routine that switch the BackColor to White when you leave the control does not check beforehand if the control is Enabled or not, and it resets the color on disabled controls.
0
BlakeMcKennaAuthor Commented:
Thanks guys...that got me thinking! Got it resolved!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.