Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

Changing BackColor in Disabled textboxes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mh1mark - 08 Dec 2004 20:01 GMT
I have a windows form for editing a table.  In Inquiry mode, I  disable the
textboxes so unwanted updates dont occur.  This causes the backcolor and
forecolor to go gray, making the text hard to read.  I can change the
backcolor to white, but the forecolor stays gray.  .forecolor properties seem
to be overridden by
textbox .enabled = false.  Also, combo boxes still have a gray backcolor,
even if  I set it's backcolor to white.

So how can I:
Change the forecolor property of a disabled textbox
Change the backcolor property of a disabled combo box
Thanks
Thanks
Cristian - 12 Dec 2004 16:55 GMT
I am also trying to find an answer to this not only for textboxes but for all
other controls as well.  Can anyone help?

> I have a windows form for editing a table.  In Inquiry mode, I  disable the
> textboxes so unwanted updates dont occur.  This causes the backcolor and
[quoted text clipped - 9 lines]
> Thanks
> Thanks
Zabi - 27 Apr 2005 07:04 GMT
Hi,

       We can override "OnPaint" method of TextBox to change the BackColor
and ForeColor of a disabled TextBox. Check out the following link..

http://msdn.microsoft.com/smartclient/community/wffaq/ctrlsp.aspx#dab0mb0m

This will helps for TextBox, But i'm unable to do this for ComboBox.

Regards,
Zabi.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.