simple text color in rich text box
问题 I can find a million examples of doing reg ex to apply syntax highlighting to a rich text box. but what i need it just a simple way to add in a word of a diffrent color. What would the code be to just put the words "Hello World" into a textbox and have Hello be red and World be green? This code doesnt work. this.richTextBox1.SelectionColor = Color.Red this.richTextBox1.text += "Test" 回答1: Select the text after you put it in and then change the color. For example: richTextBox1.Text += "Test"