我是Windows Forms的新手.我正在使用VS 2008,C#编写RichTextBox.我想在写入RichTextBox时能够用不同的颜色为每一行着色.有人可以指点我的样品.谢谢
foreach (string file in myfiles)
{
// As I process my files
// richTextBox1.Text += "My processing results";
if(file == "somefileName")
{
// Color above entered line or enter new colored line
}
}
Run Code Online (Sandbox Code Playgroud)