[Unit] Quoting text (like e-mail clients)

Demos, code samples. Only questions related to the existing topics are allowed here.
Post Reply
Sergey Tkachenko
Site Admin
Posts: 13208
Joined: Sat Aug 27, 2005 10:28 am
Contact:

[Unit] Quoting text (like e-mail clients)

Post by Sergey Tkachenko » Wed Apr 07, 2010 8:27 pm

http://www.trichview.com/support/files/rvquotetext.zip

Code: Select all

procedure QuoteText(const Prefix: String; MaxLength: Integer; rv: TCustomRichView);
This function quotes all text in rv.
Parameters:
Prefix - text to insert before each line (for example, '>', or 'John>')
MaxLength - length of lines, in pixels. Lines exceeding this width will be separated into smaller lines. Width of Prefix is not taken into account.

This procedure formats document. It is not necessary to format document before calling this procedure.

This is not an editing operation. If it is called for TRichViewEdit, call RichViewEdit.ClearUndo after.

Example:

Code: Select all

  QuoteText('>', RichViewEdit1.ClientWidth-50, RichViewEdit1);
  RichViewEdit1.ClearUndo;

Sergey Tkachenko
Site Admin
Posts: 13208
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Fri May 14, 2010 8:47 pm

A bug is fixed.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests