Drag and Drop questions. |
Post Reply |
Author | |
rthoreson
Newbie Joined: 28 June 2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
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.
|
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
rthoreson
Newbie Joined: 28 June 2007 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
Thanks!
Turns out, the OLE events are exaclty what I was looking for.
|
|
mlatona
Senior Member Joined: 19 April 2005 Location: Germany Status: Offline Points: 124 |
Post Options
Thanks(0)
|
Hi,
the parameter 'Source' is missing in the events 'OLEDragOver' and 'OLEDragDrop'. Why????
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |