Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 7th, 2007, 07:50 AM
Authorized User
 
Join Date: Oct 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default ReadOnly Text Color

Hi,

How do I change the text color of a ReadOnly TextBox??

tried belwo but doesn't change...

NameTextBox.ReadOnly = true;
NameTextBox.ForeColor = Color.SteelBlue;

thanks.
 
Old November 7th, 2007, 08:08 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

If you set both the BackColor and the ForeColor it works.

Even the following solves the problem:

textBox1.BackColor = textBox1.BackColor;

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to change color of text in a text box? larry HTML Code Clinic 6 December 29th, 2006 05:14 AM
How to set textbox property to readonly when text bekim Classic ASP Basics 1 July 12th, 2005 12:06 AM
changing a link's text color WalterD Dreamweaver (all versions) 3 February 24th, 2005 05:15 PM
set text color larry Javascript How-To 9 July 8th, 2004 01:01 AM
Need help changing color on text, please larry Javascript How-To 1 December 23rd, 2003 10:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.