Setting color of lines in Textbox

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

Guest

Hi,

i have a Textbox and amethod adding lines to the Textbox. There are two kind lines, depending on a check to be valid or invalid.

Is it possible to color the lines or the text in a textbox and how can i do this?

Thanks for any ideas
 
You have to use richTextBox to show lines in colors.

First select the line and set the SelectionColor property

richTextBox.SelectedText = "my line";
richTextBox.SelectionColor = Color.Red.

--
Shak
(Houston)


Thorsten moeller said:
Hi,

i have a Textbox and amethod adding lines to the Textbox. There are two
kind lines, depending on a check to be valid or invalid.
 
I don't think you can do that in a regular text box. RichText box is your
friend.

-vJ
 
Back
Top