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,
TcxTRichViewEdit and OnDragOver
-
- Posts: 10
- Joined: Thu Jul 05, 2012 1:00 pm
News
Hi Sergey,
Any news regarding this issue ? DragNDrop with TcxTRichViewEdit is not working.
Thanks.
Any news regarding this issue ? DragNDrop with TcxTRichViewEdit is not working.
Thanks.
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 10
- Joined: Thu Jul 05, 2012 1:00 pm
When please
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.
I realy need to fix it because it's going to production in the next week.
-
- Site Admin
- Posts: 17571
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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
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;