标签:ndt str win bool ext new select lin add
public static void AppendTextColorful(this RichTextBox rtBox, string text, Color color, bool addNewLine = true)
{
if (addNewLine)
{
text += Environment.NewLine;
}
rtBox.SelectionStart = rtBox.TextLength;
rtBox.SelectionLength = 0;
rtBox.SelectionColor = color;
rtBox.AppendText(text);
rtBox.SelectionColor = rtBox.ForeColor;
}
标签:ndt str win bool ext new select lin add
原文地址:http://www.cnblogs.com/oreobyzf/p/6244343.html