RichTextBox cannot display Unicode Mathematical alphanumeric symbols

前端 未结 1 1698
野趣味
野趣味 2020-12-16 22:25

I cannot get WinForms RichTextBox display some Unicode characters, particularly Mathematical alphanumeric symbols (but the problem is most probably not limited

相关标签:
1条回答
  • 2020-12-16 23:00

    It's a bug/decision by design in RichTextBox which has been fixed in .NET 4.7.

    RichTextBox is in fact a wrapper around RichEdit. In .NET 4.7, the control is using RICHEDIT50W while in previous versions it's using RichEdit20W.

    To solve the problem you can use either of these options:

    • Upgrade to .NET 4.7

    OR

    • You can use the latest version of RichTextBox that is RICHEDIT50W, to do so you should inherit from standard RichTextBox and override CreateParams and load library Msftedit.dll and set the ClassName to RICHEDIT50W.

    To see an implementation, take a look at this post.

    0 讨论(0)
提交回复
热议问题