Windows Develop Bookmark and Share   
 index > Windows Forms Designer > How to change the color of textbox after set enable to false?
 

How to change the color of textbox after set enable to false?

Hi,

I am using VB.Net 2005, after I set my textbox enable to false, how can I change the background color and font color of the textbox? If I just change the font color property of the textbox, it doesn't seem work.

Thanks a lot.

YeeBoon  Tuesday, November 14, 2006 4:10 AM

This guy is so kind to give you a solution when he met the same question.

 http://blogs.vbcity.com/drydo/archive/2005/06/07/2039.aspx

Gavin Jin - MSFT  Thursday, January 11, 2007 9:57 AM

check out the following link

http://www.utmag.com/wconnect/wc.dll?9,7,10,817

 

Maheswari  Tuesday, November 14, 2006 5:00 AM
why not "replace" the textbox (or combo, datetimepicker etc.) field with labels if you want to disable them. Labels are not editable. Label colors can be adapted. Just place a label over the control you want to disable and hide the control. For enabling hide the label and show the control.
Gavin Jin - MSFT  Thursday, January 11, 2007 9:51 AM

This guy is so kind to give you a solution when he met the same question.

 http://blogs.vbcity.com/drydo/archive/2005/06/07/2039.aspx

Gavin Jin - MSFT  Thursday, January 11, 2007 9:57 AM
Try using the ReadOnly property. You still get a gray background but at least the text is still readable.
nobugz  Monday, January 15, 2007 7:28 PM

You can use google to search for other answers

Custom Search

More Threads

• Build Dynamic Menu Strip
• DataGridView and Graphics
• Scrollable control vs panel
• DataGridView column header fires currentCell changed
• Snaplines in CustomDesigner
• How to add Click Event to Multicontrol Custom Control?
• Disabling the Forms Designer in VS2005
• Why isn't CellStyle Format preventing alpha characters in Number format column?
• custom designer? plzz help
• optimize application