TcxTRichViewEdit and OnDragOver

General TRichView support forum. Please post your questions here
Post Reply
abranquart
Posts: 10
Joined: Thu Jul 05, 2012 1:00 pm

TcxTRichViewEdit and OnDragOver

Post 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,
abranquart
Posts: 10
Joined: Thu Jul 05, 2012 1:00 pm

News

Post by abranquart »

Hi Sergey,

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

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

Post by Sergey Tkachenko »

I'll fix it in the next update.
abranquart
Posts: 10
Joined: Thu Jul 05, 2012 1:00 pm

When please

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17357
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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;
Post Reply