rvico TRichView Reference | TRichViewEdit

TRichViewEdit.OnBeforeOleDrop, OnAfterOleDrop

Top  Previous  Next

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 referred in inserted data (RTF or URL).

procedure TMyForm.MyRichViewEditBeforeOleDrop(Sender: TObject);
begin
  MyRVAControlPanel.InitImportPictures(nilnil);
  (Sender as TCustomRichViewEdit).OnImportPicture := MyRVAControlPanel.DoImportPicture;
end;
procedure TForm3.RichViewEdit1AfterOleDrop(Sender: TObject);
begin
  (Sender as TCustomRichViewEdit).OnImportPicture := nil;
  MyRVAControlPanel.DoneImportPictures;
end;

 

See also:

Drag&drop in TRichView';

 


TRichView © trichview.com