Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Drag and Drop questions.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Drag and Drop questions.

 Post Reply Post Reply
Author
Message
rthoreson View Drop Down
Newbie
Newbie


Joined: 28 June 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote rthoreson Quote  Post ReplyReply Direct Link To This Post Topic: Drag and Drop questions.
    Posted: 28 June 2007 at 9:27pm

Hello everyone.

I am currectly working on a C# application and I have a few questions about drag and drop for the report control.
 
1.  Is it possible to stop the control from executing an event?  For instance, I hook the dropRecords event, do some processing to add the item to the report control manually.  Unfortunately, when my code exits, the control itself continues to process the event and adds the items again.  Is there a way to stop the control from adding the items or is there another way I should be handling this?
 
2.  MouseMove events while dragging, none are generated.  Is there a way to get mousemove events while dragging?
 
3. Support for other 'drag and drop' events?  What about support for events such as 'DragOver', 'DragEnter', 'DragLeave', 'GiveFeedBack' and 'QueryContinueDrag'?
 
Thanks.
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2007 at 3:45pm
Hi,

Firstly some notes about Drag&Drop in report control.
This part was changed in latest versions and I will tell about version 11.1.3.
 
Report Control support 2 layers of Drag&Drop:
-- Internal Drag&Drop;
-- OleDrop (or External Drop)

Internal Drag&Drop is enabled using EnableDragDrop() method and allow you to copy or move records.
 
OleDrop mode works only when Internal Drag&Drop enabled and OLEDropMode property is set to ccOLEDropManual.
 
When you drop records the event DropRecordsEx (and DropRecords) is fired before records collection is changed. In this event you can modify recors, add/remove records in provided collection. If you perform custom drop - remove all elements from Records collection to skip default processing.

When records dropped and control is populated - RecordsDropped event is fired.

If OleDrop mode enabled the additional events are fired:
 -) OLEDragOver;
 -) OLEDragDrop is fired when you drop some other data format than specified in EnableDragDrop call or when xtpReportAllowDrop flag is not set and you drop 'this control' records.
 
'this control' records has data format specified in EnableDragDrop.
 
When you drop 'this control' records and xtpReportAllowDrop is set -- the DropRecordsEx (and DropRecords) fired instead of OLEDragDrop.
 
This allow you to process 'this control' records drop and External data drop separately

So, answering your questions:
>> 1.  Is it possible to stop the control from executing an event?  For instance, I hook the dropRecords event, do some processing to add the item to the report control manually.  Unfortunately, when my code exits, the control itself continues to process the event and adds the items again.  Is there a way to stop the control from adding the items or is there another way I should be handling this?   
   
When you perform custom drop - remove all elements from Records collection to skip default processing.
 
>> 2.  MouseMove events while dragging, none are generated.  Is there a way to get mousemove events while dragging?

No way, but OLEDragOver is fired when OleDrop mode enabled.
 
>> 3. Support for other 'drag and drop' events?  What about support for events such as 'DragOver', 'DragEnter', 'DragLeave', 'GiveFeedBack' and 'QueryContinueDrag'?

See the description above. The existing mechanism allows you to perform all (or the most of all) operations.

--
WBR,
Serge 
Back to Top
rthoreson View Drop Down
Newbie
Newbie


Joined: 28 June 2007
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote rthoreson Quote  Post ReplyReply Direct Link To This Post Posted: 11 July 2007 at 4:46pm
Thanks!
 
Turns out, the OLE events are exaclty what I was looking for.
 
Back to Top
mlatona View Drop Down
Senior Member
Senior Member


Joined: 19 April 2005
Location: Germany
Status: Offline
Points: 124
Post Options Post Options   Thanks (0) Thanks(0)   Quote mlatona Quote  Post ReplyReply Direct Link To This Post Posted: 12 July 2007 at 6:05am
Hi,
 
the parameter 'Source' is missing in the events 'OLEDragOver' and 'OLEDragDrop'. Why????
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.