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

Home Posts Topics Members FAQ

Setting colors to Disabled Controls

DC
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for disabled
controls (combobox, textbox, etc).

Thanks.
DC
Nov 21 '05 #1
5 1533
Hi,

No.

Ken
-----------------
"DC" <an**@anonymous.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for disabled
controls (combobox, textbox, etc).

Thanks.
DC

Nov 21 '05 #2
DC
Ok.
In that case, is there a way to get the handle of the editable portion of
the combo box.
What I am thinking of is paint the disabled region with a different color,
and draw the combobox string in a contrasting color on the painted
rectangle.
Is this possible.

Regards,
DC
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OA****************@TK2MSFTNGP15.phx.gbl...
Hi,

No.

Ken
-----------------
"DC" <an**@anonymous.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for disabled controls (combobox, textbox, etc).

Thanks.
DC

Nov 21 '05 #3
DC
Any ideas anyone?

"DC" <an**@anonymous.com> wrote in message
news:O6**************@TK2MSFTNGP14.phx.gbl...
Ok.
In that case, is there a way to get the handle of the editable portion of
the combo box.
What I am thinking of is paint the disabled region with a different color,
and draw the combobox string in a contrasting color on the painted
rectangle.
Is this possible.

Regards,
DC
"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OA****************@TK2MSFTNGP15.phx.gbl...
Hi,

No.

Ken
-----------------
"DC" <an**@anonymous.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi All,

When a control is disabled, it is grayed out.
Is there anyway to set a different foreground/background color for

disabled
controls (combobox, textbox, etc).

Thanks.
DC


Nov 21 '05 #4
"DC" <an**@anonymous.com> schrieb:
In that case, is there a way to get the handle of the editable
portion of the combo box.


You can use the code in the sample below to get the handle to the 'EDIT'
portion of your combobox:

<URL:http://dotnet.mvps.org/dotnet/faqs/?id=comboboxpasswordchar>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #5
DC
Thanks Herfried.
I'll try the sample and get back - may take some time, but will post here.

Regards,
DC

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:ex**************@TK2MSFTNGP10.phx.gbl...
"DC" <an**@anonymous.com> schrieb:
In that case, is there a way to get the handle of the editable
portion of the combo box.


You can use the code in the sample below to get the handle to the 'EDIT'
portion of your combobox:

<URL:http://dotnet.mvps.org/dotnet/faqs/?id=comboboxpasswordchar>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6

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

Similar topics

21
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on the UI and not programatically? Thanks
5
by: Jason Butera | last post by:
I know that I can read/write custom properties of an object by using the following: Setting: document.all.customProp = "this"; Getting: document.all.customProp; Is there a way I can run...
6
by: Stu Carter | last post by:
Hi, I have an aspx page where some controls are initially disabled by the code-behind 'Page_Load' event. I want these controls to be dynamically enabled when the user checks a checkbox. ...
2
by: Kubuli John | last post by:
I have a LinkButton in an ASP.NET web form. Depending on the current state of affairs, I either enable or disable the link button in by code-behind class (e.g., disable the "Previous" button if...
2
by: Cliff Lane | last post by:
I have an application that allows the user to select fore and back ground colors for command buttons. I use the dialog to select the colors and store the value returned in the db as a string. For...
1
by: Demi | last post by:
I want to be able to define standard colors in a base form, then have child forms use those values instead of standard colors. Ex in my base form I want to do this: Color myColor =...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
4
by: Sam Carleton | last post by:
How do I change the CSS colors via JavaScript DOM? Let me explain... I am working on a Windows application (in C#) that displays some HTML. In one place the HTML is a status window. What happens...
8
by: Jeff | last post by:
ASP.NET 2.0 I'm wondering how to set the color of a visited HyperLinkField (the link text) in a GridView?? Here is the markup of the HyperLinkField I have problems with: <asp:HyperLinkField...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.