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
๋ฐ์ํ
'๐จ๐ผโ๐ป๊ฐ๋ฐ > C#' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
C# - DateTime D-Day ๊ตฌํ๊ธฐ(TimeSpan) (0) | 2022.10.08 |
---|---|
C# - CookieContainer ์ฟ ํค ๊ฐ ๊ฐ์ ธ์ค๊ธฐ (0) | 2022.10.03 |
C# - ์ค์ ๊ฐ ์ ์ฅํ๊ณ ๋ถ๋ฌ์ค๊ธฐ (0) | 2022.09.26 |
C# - Application.Exit() ๋ช ๋ น์ด ์๋ ๊ฒฝ์ฐ (Environment.Exit(Environment.ExitCode)) (0) | 2022.09.26 |
C# - .NET ๋์ปดํ์ผ๋ฌ ๋ฐ ์ด์ ๋ธ๋ฆฌ ๋ธ๋ผ์ฐ์ (dotPeek) (0) | 2022.09.04 |