font colour for disabled or read only textbox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a textbox that needs to have red font.
I also want it set to enable=false, or else 'read-only'.
When I change to either of these settings, the font turns black.
Is there a way around this?
Thanks in advance,
Amber
 
TextBox t = new TextBox();
t.ForeColor = Color.Red; // this is the line to change the text color
 
One way is after making the text box read-only, manually change the
backcolor of the textbox to Color.FromKnownColor (KnownColor.Window):

//C#
textBox.BackColor = Color.FromKnownColor (KnownColor.Window);

Hello,
I have a textbox that needs to have red font.
I also want it set to enable=false, or else 'read-only'.
When I change to either of these settings, the font turns black.
Is there a way around this?
Thanks in advance,
Amber
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top