Planner Clipboard Events?

Hi,


I want to use the clipboard feature of the planner but it appears that no events are fired that i can capture. I need to do some background processing of details in a different object when user deletes an item with Ctrl-X and inserts an new item with Ctrl-V.

There is an OnItemClipboardAction event but this doesn't fire using the keyboard shortcuts. I think this is for when user is using the clipboard when editing the description?

Looking at code in TPlannerGrid.Keydown
if would be helpful to have a before and after event fire.
e.g.

/* FIRE A BEFORE COPY EVENT TO CAPTURE THE ITEM BEING COPIED /
            FPlanner.Items.CopyToClipboard;
...

/ FIRE A BEFORE CUT EVENT TO CAPTURE THE ITEM BEING CUT*/
            FPlanner.Items.CutToClipboard;
...

          FPlanner.Items.PasteFromClipboardAtXY;
/* FIRE AN AFTER PASTE EVENT TO PROCESS ITEM JUST INSERTED */
...

Do I just override the KeyDown handler and write my own event handling?
Any advice?

Regards
Adam

At this moment there isn't an event for these specific actions. It makes sense indeed and we can confirm that the next update will have events OnItemCut, OnItemCopy, OnItemPaste.
The event OnItemClipboardAction applies to clipboard text cut,copy & paste while doing inplace editing.

Thanks Bruno,


I've gone ahead and made changes to your source to allow me to continue. I will send you a copy in case it is useful to you.

I ended up needing the following:

OnItemCutting - With an Allow parameter to prevent some items from being cut
OnItemCut
OnItemCopying - With an Allow parameter to prevent some items from being copied
OnItemCopied 
OnItemPasting - With an Allow parameter to prevent pasting into incorrect locations (it would be useful to pass the Item->Pos, Item->ItemBegin, Item->ItemEnd to this event (or even better a temporary copy of the item that is about to be pasted) but I didn't want to spend any more time on it.
OnItemPasted

There also appears to be an issue with your Pasting algorithm. It does not honour the AllowOverlap setting on existing items in the plan.  Ideally you should not be able to pasted over an item with AllowOverlap turned off as this creates a conflict that needs to be resolved in my app. If you can't do this in the paste then it would help to pass those other parameters to the OnItemPasting event so I can check for a conflict myself.

Regards
Adam

Thanks for the update that was meanwhile received by email. We'll look to merge this and at the same time address the AllowOverlap issue.