[RichTextBoxEntension] - Append Multiline/Multicolor Text
public static class RichTextBoxExtensions
{
public static void AppendText(this RichTextBox oBox, string sText, Color oColor)
{
oBox.SelectionStart = oBox.TextLength;
oBox.SelectionLength = 0;
oBox.SelectionColor = oColor;
oBox.AppendText(sText + "\r\n");
oBox.SelectionColor = oBox.ForeColor;
oBox.ScrollToCaret();
}
}
Written by Leandro Paixão
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#