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
Alex K - 08 Oct 2004 04:43 GMT
TextBox t = new TextBox();
t.ForeColor = Color.Red; // this is the line to change the text color
> Hello,
> I have a textbox that needs to have red font.
[quoted text clipped - 3 lines]
> Thanks in advance,
> Amber
amber - 12 Oct 2004 16:49 GMT
this doesn't work if the cell is set to enabled = false
> TextBox t = new TextBox();
> t.ForeColor = Color.Red; // this is the line to change the text color
[quoted text clipped - 6 lines]
> > Thanks in advance,
> > Amber
Shiva - 08 Oct 2004 04:55 GMT
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