.Net/Winform
C# RichTextBox 인쇄 할 때 Font 반영
동구밖과수원
2012. 10. 10. 17:09
void Document_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { int itar=0; foreach (char c in this.richTextBox.Text) { if (c != '\n') { this.richTextBox.Select(itar, 1); Point point = this.richTextBox.GetPositionFromCharIndex(itar); e.Graphics.DrawString(c.ToString(), this.richTextBox.SelectionFont, new SolidBrush(this.richTextBox.SelectionColor), point); } itar++; } }