Drag-and-Drop in Unmodified TDBRichViewEdit

General TRichView support forum. Please post your questions here
Post Reply
Michel
Posts: 92
Joined: Fri Oct 14, 2005 2:56 pm
Contact:

Drag-and-Drop in Unmodified TDBRichViewEdit

Post by Michel »

Hi Sergey,

I think there may be a little bug with this.
In a not-yet modified record with a TDBRichViewEdit, perform a Drag-and-Drop operation on some selected text. It should move it, right? Instead, it copies it. No problem if the record has been modified (and is hence in dsEdit state).

Thanks,

Michel
Michel
Posts: 92
Joined: Fri Oct 14, 2005 2:56 pm
Contact:

Post by Michel »

Hi Sergey,

Did you miss my question by any chance? :wink:

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

Post by Sergey Tkachenko »

Fix: in RVERVData.pas, change TRVEditRVData.InitDragging to:

Code: Select all

function TRVEditRVData.InitDragging(var DropSource: TRVDropSource;
  var OKEffect: Integer): Boolean;
begin
  Result := inherited InitDragging(DropSource, OKEffect);
  if Result and (rvflRoot in Flags) and
    (not TCustomRichViewEdit(FRichView).ReadOnly or (rvflDBRichViewEdit in Flags)) and
    CanDelete then
    OKEffect := OKEffect or DROPEFFECT_MOVE;
end;
This fix will be included in the next update.
Post Reply