Using of OnCut event

General TRichView support forum. Please post your questions here
Post Reply
vit
Posts: 115
Joined: Tue Feb 03, 2009 3:11 pm

Using of OnCut event

Post by vit »

There is TRichViewEdit.OnCut event. But it is disabled by RVONCUT directive, wich is disabled by default. Can I enable RVONCUT in RV_Defs.inc to use OnCut event?

Thank you!
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, you can do it.
This event was requested so I added it, but I still think it useless (because Cut = Copy + Delete), so I disabled it.
vit
Posts: 115
Joined: Tue Feb 03, 2009 3:11 pm

Post by vit »

Sergey Tkachenko wrote:because Cut = Copy + Delete

If I understood you right, I can use OnItemAction to detect deletion action. So I can detect cutting action by determination this actions sequence:

1. OnCopy event is fired
2. OnItemAction is fired with ItemAction = rviaTextModifying or rviaMovingToUndoList

Or may be there is simpler way to detect cutting action without using OnCut property?

Thank you!
Post Reply