Search code examples
c#richtextboxmaxlength

RichTextbox MaxLength too small


I need to open a text file with ~4MB in a RichTextBox, but the end of the text was "trimmed".

How do I override a RichTextBox.MaxLength Int32 limit?


Solution

  • I'm not sure how much text RichTextBox can handle, but I believe MaxLength only applies to text the user enters. If you set .Text directly it should be able to go past MaxLength, unless MaxLength is already at the maximum.