trichview.com

trichview.support




Re: TRichView and simple text editing?


Return to index


Author

Message

Sergey Tkachenko

Posted: 04/28/2005 0:27:09


Formatted text can appear in editor as a result of Clipboard operation or

drag&drop:


1) Exclude all but text from AcceptDragDropFormat

2) Process OnPaste event:


procedure TForm1.rvePaste(Sender: TCustomRichViewEdit;

  var DoDefault: Boolean);

var s: String;

begin

  if Clipboard.HasFormat(CF_TEXT) then begin

    s := Clipboard.AsText;

    rve.InsertText(s, False);

  end;

  DoDefault := False;

end;



> Hi all -

>

> Is there any property or setting which would let me use TRichView as

> essentially a TMemo for editing simple text?  Sort of like TRichEdit's

> PlainText property?  This would turn off any rendering capabilities and

> simply work wiht text.

>

> I have a situation where depending on some criteria, i would like to be

able

> to use TRichView as an RTF editor or alternatively as a simple text

editor.

>

> Alan

>

>





Powered by ABC Amber Outlook Express Converter