且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C#:在不选择文本的情况下更改 WinForm RichTextBox 的字体样式

更新时间:2021-08-09 01:08:32

糟糕,我错误地使用了 Hans 代码.我应该调用 BeginUpdate() 停止绘制控制,调用 EndUpdate() 重新开始绘制.我是反过来做的.

Oops turns out I was using Hans code incorrectly. I was supposed to call BeginUpdate() to stop drawing control and EndUpdate() to start drawing it again. I was doing it the other way around.

感谢大家的帮助(尤其是 Hans)!

Thanks for all the help, everyone (especially Hans)!