[vc++ .net 2005] changing color of disabled button?

Posted on 2007-07-31
Medium Priority
Last Modified: 2013-11-26
Hi all,

I have a button that can be enable or disable. When it's disabled, only the text color on the button changes from black to grey. But, I want more noticible change when button is disabled. Is there any way to make it noticible? I was thinking to change the color of the button itself. Does anyone know how to do? Any other method is welcomed too.

Question by:shinymoon
LVL 19

Accepted Solution

drichards earned 1000 total points
ID: 19606868
I this a .NET form (just do set the BackColor property of the button - like "button1->BackColor = System::Drawing::Color::CadetBlue;") or something else?
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 1000 total points
ID: 19610782
The problem is going to be when you set Enabled = false, then you can't change the text color.  Another problem is that when FlatStyle = System, then you can't change the BackColor for the button.


Author Comment

ID: 19620273
okay. I see. I'll try many ways based on the comments. Thanks a lot~

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month16 days, 12 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question