trichview.com

trichview.support




Re: disable style change from drag'n drop operation


Return to index


Author

Message

Sergey Tkachenko

Posted: 05/29/2004 15:42:17


There are several ways to do it.


1) RESTRICTING FORMATS


You can allow accepting only plain text formats.

Exclude all options from AcceptDragDropFormats except for rvddText.


Besides, new styles can be added when pasting from the Clipboard.

You can process OnPaste to allow pasting only a plain text:


procedure TForm3.RichViewEdit1Paste(Sender: TCustomRichViewEdit;

  var DoDefault: Boolean);

begin

  if IsClipboardFormatAvailable(CF_TEXT) then

    Sender.PasteText;

  DoDefault := False;

end;


2) OPTIONS FOR RTF AND RVF

You can set options for inserting RVF and RTF so that it will not add new

styles.

Right click the RichViewEdit that must have a fixed set of styles, choose

"Settings" in the context menu,

set the mode "Use a predefined set of styles".


>

> Hi Sergey

>

> I have two RichViewEdits. One with many styles, the second with only one

> style. I select text in the first and then drag it to second.

> Styles from the first RichView are now also in the second richview (text

> is formatted as in first richviewedit)...

> I want to disable style/paragraph change in the second Richviewedit, but

> how to do it.

>





Powered by ABC Amber Outlook Express Converter