RichTextBox Paste limited to 32k chars?

I have a WinForms application with a RichTextBox.
If I copy 100k chars from Notepad++ text and try to use CTRL+V on RichTextBox, only 32.200 chars are pasted in.
Note that I can go on typing in RichTextBox, so problem is not MaxLength .
Why? How can I solve it?


No repro, I just pasted 1.4 million characters from Notepad into an RTB. You'll need to consider another source of the problem, pebkac or Notepad++. Check if the syntax coloring is preserved when you paste into the RTB. In which case the limitation is on the amount of RTF that Scintilla is willing to generate. Which is a fair one, programmer Q+A sites don't allow that much text in a post.


From MSDN - RichTextBox.MaxLength Property

RichTextbox1.Length = Int32.MaxValue;

This should give you 2,147,483,647 characters

链接地址: http://www.djcxy.com/p/94630.html

上一篇: 我是否理解UIActivityViewController错误?

下一篇: RichTextBox粘贴限于32k字符?