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
 
Back
Top