Store more than 64 KB in a TRichEdit

Author: Thomas Stutz 

 

 

{

  By default, a TRichedit's text is limited to 64 KB.

  Setting the Maxlength property to $7FFFFFF0 allows you to have approx.

  2GB of text.

 

  Standardmässig ist der Text im Richedit auf 64 KB beschränkt.

  Indem man die Maxlength auf $7FFFFFF0 setzt, kann man ungefähr 2 GB

  Text im TRichEdit haben.

}

 

procedure TForm1.Button1Click(Sender: TObject);

begin

  RichEdit11.MaxLength := $7FFFFFF0;

end; 

 

 

 

//oder:

//or:

 

procedure TForm1.Button1Click(Sender: TObject);

begin

  SendMessage(RichEdit1.Handle, EM_EXLIMITTEXT, 0, $7FFFFFF0);

end;