Page 1 of 1

TcxTRichViewEdit and OnDragOver

Posted: Wed Sep 05, 2012 4:18 pm
by abranquart
Hi Sergey,

I need to use DragNDrop with TcxTRichViewEdit, but it seems that TcxTRichViewEdit.OnDragOver is not working, it only accepts drags at the very first top pixel line of the control.

I try a very simple example :
I put a TRichViewEdit and a TcxTRichViewEdit on a form and implement the OnDragOver of the two components with Accept := True;

Drag something over the two components :
The first one (TRIchViewEdit) has the good behavior, but not TcxTRichViewEdit. OnDragOver is called, but it only accepts the dragover if you put the cursor at the very first top pixel of the component.

Can you help me please ?

Thank a lot.

Regards,

News

Posted: Mon Sep 10, 2012 9:15 am
by abranquart
Hi Sergey,

Any news regarding this issue ? DragNDrop with TcxTRichViewEdit is not working.

Thanks.

Posted: Mon Sep 10, 2012 4:56 pm
by Sergey Tkachenko
I'll fix it in the next update.

When please

Posted: Mon Sep 10, 2012 4:59 pm
by abranquart
Can you please tell me when you will publish the next update ?
I realy need to fix it because it's going to production in the next week.

Posted: Mon Sep 10, 2012 7:29 pm
by Sergey Tkachenko
Quick fix.

Open cxTRichView.pas, add methods to TcxInnerTRichViewEdit:
protected:
procedure DragOver(Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); override;
public:
procedure DragDrop(Source: TObject; X, Y: Integer); override;

Implementation

Code: Select all

procedure TcxInnerTRichViewEdit.DragDrop(Source: TObject; X, Y: Integer);
begin
  Container.DragDrop(Source, Left + X, Top + Y);
end;
{------------------------------------------------------------------------------}
procedure TcxInnerTRichViewEdit.DragOver(Source: TObject; X, Y: Integer;
  State: TDragState; var Accept: Boolean);
begin
  Container.DragOver(Source, Left + X, Top + Y, State, Accept);
end;