RichTextBox font set to all lines in C#

前端 未结 1 917
[愿得一人]
[愿得一人] 2020-12-22 01:23

I changed the font of a RichTextBox, but this change does not set to all of its characters properly. Indeed there exist two font for the RichTextBox and that is not beautifu

相关标签:
1条回答
  • 2020-12-22 02:11

    Set the selection to the entire box and set the SelectionFont.

    this.richTextBox1.SelectionStart = 0;
    this.richTextBox1.SelectionLength = this.richTextBox1.SelectionLength;
    this.richTextBox1.SelectionFont = new System.Drawing.Font("Maiandra GD", 12);
    
    0 讨论(0)
提交回复
热议问题