Wrong Event Order Dropping Into Active Cell
Posted: Fri Feb 10, 2006 9:12 pm
Hi Sergey,
Summary of the problem. Drag-and-drop an object (B) into a TRichViewEdit (RV).
If dropped into text or an inactive cell of a table, the order of events is: RV.OnDragDrop followed by B.OnEndDrag (which seems to be the correct order).
If dropped into active cell, the order of events is reversed: B.OnEndDrag followed by RV.OnDragDrop. This looks like a bug to me.
The above usually doesn't cause any noticeable problems – except if dragging a custom drag object from some component that deletes the "Source" drag object in response to the OnEndDrag event. In my case, this happens to be ExpressQuantumGrid. The net result is therefore a deleted "Source" object by the time I get the RV.OnDragDrop event. But only when dropping into an active cell. By this I mean: the cell that the cursor was in before I started the drag operation.
Thank you,
Michel
Summary of the problem. Drag-and-drop an object (B) into a TRichViewEdit (RV).
If dropped into text or an inactive cell of a table, the order of events is: RV.OnDragDrop followed by B.OnEndDrag (which seems to be the correct order).
If dropped into active cell, the order of events is reversed: B.OnEndDrag followed by RV.OnDragDrop. This looks like a bug to me.
The above usually doesn't cause any noticeable problems – except if dragging a custom drag object from some component that deletes the "Source" drag object in response to the OnEndDrag event. In my case, this happens to be ExpressQuantumGrid. The net result is therefore a deleted "Source" object by the time I get the RV.OnDragDrop event. But only when dropping into an active cell. By this I mean: the cell that the cursor was in before I started the drag operation.
Thank you,
Michel