Page 1 of 1

Drag-and-Drop in Unmodified TDBRichViewEdit

Posted: Thu Jul 27, 2006 2:03 pm
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

Posted: Fri Oct 13, 2006 8:16 pm
by Michel
Hi Sergey,

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

Thanks,

Posted: Tue Oct 17, 2006 4:18 pm
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.