Quote Originally Posted by Mith View Post
vbccr v1.7.1

i load a 6 MB text file into a RichTextBox using the command:

Code:
rtfLog.LoadFile sLogFile, RtfLoadSaveFormatUnicodeText
now the size of the RichTextBox content is 3102656 bytes determined by the command:
Code:
Len(rtfLog.Text)
after that i do a word wrap with the command:

Code:
rtfLog.ScrollBars = vbVertical
after the word wrap the content of the RichTextBox is truncated: now the size is only 67731 bytes!

any idea how to word wrap without cutting the content of the RichTextBox?
or is this a bug?

control properties:

Name:  Screenshot - 15.01.2021 , 12_30_53.png
Views: 1518
Size:  17.4 KB
Changing the ScrollBars to vbVertical triggers internally a re-creation of the rich text box.
So try to put the code before you load the 6MB file for a quick fix.
However, I would like to test whats the problem. Can you wrap up a demo project?