DeleteItems and Undo

General TRichView support forum. Please post your questions here
Post Reply
johnF
Posts: 27
Joined: Mon Feb 02, 2015 4:41 pm

DeleteItems and Undo

Post by johnF »

Hi,

Is it possible to undo/redo DeleteItems? I have tried the code below but got errors when clicking Undo.

Code: Select all

BeginUndoGroup(rvutDelete); 
SetUndoGroupMode(True); 
try 
  DeleteItems(5, 5);
finally 
  SetUndoGroupMode(False); 
end;
Cheers, Jim.
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

DeleteItems is not an editing operations, it cannot be undone.
Select these items using SetSelectionBounds and call DeleteSelection.
Post Reply