一开始:
this.richTextBox1.Text = "欢迎";
this.richTextBox1.SelectAll();
this.richTextBox1.SelectionColor = Color.Red;
Font font = new Font(FontFamily.GenericMonospace,14,FontStyle.Regular);
this.richTextBox1.SelectionFont = font;
点击按钮:
this.richTextBox1.Text = "谢谢";
this.richTextBox1.SelectAll();
this.richTextBox1.SelectionColor = Color.Black;
Font font = new Font(FontFamily.GenericMonospace,10,FontStyle.Regular);
this.richTextBox1.SelectionFont = font;
c# richtextbox修改字体大小和颜色
猜你喜欢
转载自blog.csdn.net/update7/article/details/80298481
今日推荐
周排行