๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ‘จ๐Ÿผ‍๐Ÿ’ป๊ฐœ๋ฐœ/C#

C# - RichTextBox ์ƒ‰๊น” ์ง€์ •

by Janger 2022. 9. 29.
728x90
๋ฐ˜์‘ํ˜•

 

void AppendRichText(RichTextBox box, string text, Color color)
{
    box.SelectionStart = box.TextLength;
    box.SelectionLength = 0;

    box.SelectionColor = color;
    box.AppendText(text + "\n");
    box.SelectionColor = box.ForeColor;
}

 

์ถœ์ฒ˜: 

https://stackoverflow.com/questions/1926264/color-different-parts-of-a-richtextbox-string

 

Color different parts of a RichTextBox string

I'm trying to color parts of a string to be appended to a RichTextBox. I have a string built from different strings. string temp = "[" + DateTime.Now.ToShortTimeString() + "] " + use...

stackoverflow.com

 

728x90
๋ฐ˜์‘ํ˜•