473,569 Members | 2,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Background color when control is disabled

Setting the ReadOnly property of my controls changes the background
color. The same happens when I set Enabled = False. Where does .NET
get the new background color from? Is it configurable?

thanks
Nov 21 '05 #1
2 1890
James,

Strange, never saw this, do you have a piece of your code where that is in?

Cor

"James Ramaley"
...
Setting the ReadOnly property of my controls changes the background
color. The same happens when I set Enabled = False. Where does .NET
get the new background color from? Is it configurable?

thanks

Nov 21 '05 #2
Hi,

No you cant change the background color of a control like a
textbox that is readonly. You would have to make your own textbox to change
the background color. The systemcolors class contains many of the standard
colors of a control.

Ken
------------------------
"James Ramaley" <jr******@iname .com> wrote in message
news:f8******** *************** ***@posting.goo gle.com...
Setting the ReadOnly property of my controls changes the background
color. The same happens when I set Enabled = False. Where does .NET
get the new background color from? Is it configurable?

thanks
Nov 21 '05 #3

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

Similar topics

2
1756
by: Skip Borland | last post by:
Has anyone tried to control the color changes that occur when a .net control (in this case specifically, a combo box) is disabled? We are trying to limit input, yet not have the control go gray on gray when disabled (or at least be able to control the behavior). Any thoughts on this would be appreciated....Skip
3
1968
by: Steve | last post by:
I have windows form with the few TextBox controls. Under certain conditions I disable or enable this controls by setting Enable property to true or false: For example: this.m_txtIP.Enabled = false ; The controller become disabled, and I can't enter any data. The problem is that the background color of the TextBox doesn't change whether it...
8
10590
by: Grahammer | last post by:
Is it possible to set the background of a usercontrol as transparent? I tried setting the background image of the usercontrol to a transparent GIF, but that caused MAJOR problems. I'm making some controls that aren't rectangular and it won't be pretty if I end up with a grey rectangle behind each one. ...
4
3850
by: RSH | last post by:
This might be a dumb question but I have searched everywhere...I have a form which uses a custom background color. I have set the control's backgrounds to transparent, which works great. But when i disable the controls, they all have the standard beige Windows background, is there a way to set the disabled background color too?? Thanks,...
2
14051
by: Martyn Quick | last post by:
If I create a Tkinter.Entry widget, I can adjust the background and the text colours, using the background and foreground options. However, if the state is "disabled", then this has no effect and it just appears as grey on a light grey background. E.g., Tkinter.Entry(root, foreground="black", background="white", state="disabled").grid() ...
6
9637
by: Francois Bonzon | last post by:
Any idea how I can launch a background task from a PHP script? For example, when a user posts on my message board, it may fire many e-mail notifications to other users, and other tasks. I want the posting confirmation page to end displaying quickly, without waiting for those notifications or other tasks to complete. So basically what I...
4
2419
by: Mel | last post by:
how can i change disabled background on all form elements ?
1
3156
by: Mel | last post by:
i need to display background of gray for all disabled form inputs can you please help me ? thanks a whole bunch
4
584
by: =?Utf-8?B?UGF0cmlja1M=?= | last post by:
I'd like to be able to give a treeview in my application a nice smooth gradient as a background image, but I'm having trouble doing this. Webpages that I've seen so far seem to suggest using the BackgroundImage property, but this does not seem to work. I'm using C# Express 2008. Does anybody here have any solutions?
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8120
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.