TCustomRichViewEdit.OnBeforeOleDrop, OnAfterOleDrop [VCL and LCL]

<< Click to display table of contents >>

TCustomRichViewEdit.OnBeforeOleDrop, OnAfterOleDrop [VCL and LCL]

OLE drag&drop events. They occur when the user completes drag&drop operation into the editor. These events occur before and after insertion.

property OnBeforeOleDrop: TNotifyEvent;

property OnBeforeOleDrop: TNotifyEvent;

(introduced in version 16)

When the editor accepts dropped data, the following sequence of actions happens:

1.OnBeforeOleDrop event

2.data insertion (OnOleDrop event may occur)

3.OnAfterOleDrop event

 

These events may be used to initialize and finalize insertion as a result of OLE drag&drop.

Example

This example uses RichViewActions.

MyRVAControlPanel: TRVAControlPanel is placed on a form. A downloader component is assigned to MyRVAControlPanel.DownloadInterface property, to allow downloading remote pictures and CSS files referred in inserted data (RTF or URL).

procedure TMyForm.MyRichViewEditBeforeOleDrop(Sender: TObject);
begin
  MyRVAControlPanel.InitImportPicturesAndFiles(nil,
    (Sender as TCustomRichViewEdit));
end;
procedure TForm3.RichViewEdit1AfterOleDrop(Sender: TObject);
begin
  MyRVAControlPanel.DoneImportPicturesAndFiles(
    (Sender as TCustomRichViewEdit));
end;

 

See also:

Drag&drop in TRichView';