473,473 Members | 1,672 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Disable ForeColor

Hi,

Do we have a way to change the text color of a (textbox,
dropdownlist...) when they are at Enable = false.
Because i don't want to have light grey text when they are disabled.

I can use readonly on the textbox, but not with my dropdownlist.

Thank you !
Nov 18 '05 #1
3 3094
Nope, is the short answer. It's disabled. You aren't allowed to muck with
it.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Andre" <lo*****@cablevision.qc.ca> wrote in message
news:et*************@tk2msftngp13.phx.gbl...
Hi,

Do we have a way to change the text color of a (textbox,
dropdownlist...) when they are at Enable = false.
Because i don't want to have light grey text when they are disabled.

I can use readonly on the textbox, but not with my dropdownlist.

Thank you !

Nov 18 '05 #2

It's not possible in IE. For Mozilla and friends you can use:

input[disabled] {
color: #555555;
}

If you *have* to have this kind of thing in IE; then one solution is to create a custom TextBox
class that overrides the render method and generates something that looks like an <input> when the
control is !enabled, but isn't (for example, you could render <span style="border:solid 2px
black;color:#555555">Input Field Text</spa> -- you'd have to tweak the style to get it to your
liking).

Scott

"Andre" <lo*****@cablevision.qc.ca> wrote in message news:et*************@tk2msftngp13.phx.gbl...
Hi,

Do we have a way to change the text color of a (textbox,
dropdownlist...) when they are at Enable = false.
Because i don't want to have light grey text when they are disabled.

I can use readonly on the textbox, but not with my dropdownlist.

Thank you !

Nov 18 '05 #3

It's not possible in IE. For Mozilla and friends you can use:

input[disabled] {
color: #555555;
}

If you *have* to have this kind of thing in IE; then one solution is to create a custom TextBox
class that overrides the render method and generates something that looks like an <input> when the
control is !enabled, but isn't (for example, you could render <span style="border:solid 2px
black;color:#555555">Input Field Text</spa> -- you'd have to tweak the style to get it to your
liking).

Scott

"Andre" <lo*****@cablevision.qc.ca> wrote in message news:et*************@tk2msftngp13.phx.gbl...
Hi,

Do we have a way to change the text color of a (textbox,
dropdownlist...) when they are at Enable = false.
Because i don't want to have light grey text when they are disabled.

I can use readonly on the textbox, but not with my dropdownlist.

Thank you !

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: meska | last post by:
Hi all is there a way in a treeview to hide or disable node without reloading the tree or removing the node? I meen if i could programaticly set the node to be disabled ( grayed out, user cannot...
6
by: Mantorok | last post by:
Hi all Is it possible to disable a Control in .Net but have the text colour always in black? I would rather use Enabled property rather than Readonly as it does everything I need it to in one...
3
by: Steve Le Monnier | last post by:
When you make a textbox control disabled ( txtText1.Enabled = false; ) You're left with grey text on a greyer background, which is not ideal. The Read-Only property is no use to me as I need to...
2
by: tottigang | last post by:
Hi, I have a tabstrip and I have some tabs in it. On the first page, all the tabs are enabled, I need to disbale part of the tabs at a specific point in the application and again enable them. I...
2
by: Andre | last post by:
Hi, Do we have a way to change the text color of a (textbox, dropdownlist...) when they are at Enable = false. Because i don't want to have light grey text when they are disabled. I can use...
2
by: Agnes | last post by:
my client complaint that "when the textbox is disabled, the forecolor is too light ". How can I change it ? Thanks a lot
4
by: Matrixreloadedth | last post by:
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...
5
by: Ike | last post by:
Does anyone know how to disable a list box element in VB 6 ? Thanks Ike
17
by: govolsbaby | last post by:
Is there a way to leave the button forecolor unchanged when it is disabled? I have multiple buttons on the form and depending on various user inputs, some will or will not be enabled but I'd...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.