Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RichTextBox Paste limited to 32k chars?

Tags:

c#

richtextbox

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?

like image 312
Marco Avatar asked Dec 12 '25 20:12

Marco


1 Answers

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.

like image 192
Hans Passant Avatar answered Dec 14 '25 09:12

Hans Passant



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!