By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,656 Members | 1,327 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,656 IT Pros & Developers. It's quick & easy.

How to change disable color for Checkbox???

P: n/a
How to change disable color of Checkbox??? I have a checkbox with
forecolor in red but when i disable by set Enable properties to false
forecolor is changed to gray color but i don't want it. how to make
disable color as the same before set enable = false
Anyone can help me?????

May 26 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
To get around that issue, I just create an event handler that, whenever the
checkbox is clicked, sets its value back to what I wanted it to be. If it is
supposed to be checked, then every click event checks the box, etc.

If the checkbox in question is always disabled but you just don't want it
gray, they you can even inherit a new control from TextBox and build that
behavior into the checkbox.

Dale
--
Dale Preston
MCAD C#
MCSE, MCDBA
"Ma**************@gmail.com" wrote:
How to change disable color of Checkbox??? I have a checkbox with
forecolor in red but when i disable by set Enable properties to false
forecolor is changed to gray color but i don't want it. how to make
disable color as the same before set enable = false
Anyone can help me?????

May 28 '06 #2

P: n/a
Dale,Thank you for your reply.

But i have some questions? Checkbox are inherited from ButtonBase and
why u suggest me to create new control from TextBox ? Not a ButtonBase?
and another question,Are you can give me some code snippets about
inherit new control from TextBox?

and i will give you more information for my purpose:
I want to use all behavior of checkbox but only thing, the
forecolor of checkbox ( Text color) when it's disable,i don't want make
it's checkbox text color different from enable and only checkbox
region that can be gray color when it's disable, not a Text.

Please Help me???
Thanks.

Dale เขียน:
To get around that issue, I just create an event handler that, whenever the
checkbox is clicked, sets its value back to what I wanted it to be. If it is
supposed to be checked, then every click event checks the box, etc.

If the checkbox in question is always disabled but you just don't want it
gray, they you can even inherit a new control from TextBox and build that
behavior into the checkbox.

Dale
--
Dale Preston
MCAD C#
MCSE, MCDBA
"Ma**************@gmail.com" wrote:
How to change disable color of Checkbox??? I have a checkbox with
forecolor in red but when i disable by set Enable properties to false
forecolor is changed to gray color but i don't want it. how to make
disable color as the same before set enable = false


Anyone can help me?????


May 28 '06 #3

P: n/a
Whoops. I meant to create a new checkbox by extending CheckBox, not TextBox.

Dale
--
Dale Preston
MCAD C#
MCSE, MCDBA
"Ma**************@gmail.com" wrote:
Dale,Thank you for your reply.

But i have some questions? Checkbox are inherited from ButtonBase and
why u suggest me to create new control from TextBox ? Not a ButtonBase?
and another question,Are you can give me some code snippets about
inherit new control from TextBox?

and i will give you more information for my purpose:
I want to use all behavior of checkbox but only thing, the
forecolor of checkbox ( Text color) when it's disable,i don't want make
it's checkbox text color different from enable and only checkbox
region that can be gray color when it's disable, not a Text.

Please Help me???
Thanks.

Dale เขียน:
To get around that issue, I just create an event handler that, whenever the
checkbox is clicked, sets its value back to what I wanted it to be. If it is
supposed to be checked, then every click event checks the box, etc.

If the checkbox in question is always disabled but you just don't want it
gray, they you can even inherit a new control from TextBox and build that
behavior into the checkbox.

Dale
--
Dale Preston
MCAD C#
MCSE, MCDBA
"Ma**************@gmail.com" wrote:
How to change disable color of Checkbox??? I have a checkbox with
forecolor in red but when i disable by set Enable properties to false
forecolor is changed to gray color but i don't want it. how to make
disable color as the same before set enable = false
Anyone can help me?????


May 28 '06 #4

P: n/a
Thanks.

May 29 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.