Page 1 of 1

Disable Undo/Redo temporarily

Posted: Mon Apr 03, 2023 12:56 pm
by tomr
Hi Sergey,
I was wondering if there is a possible way to disable undo/redo temporarily. I want to make changes to a richedit and the specific changes should not be part of the undo list. Nevertheless i do not want to clear the undolist completly. Is there a lock function or anything else, I could use?

Best regards
Tom

Re: Disable Undo/Redo temporarily

Posted: Mon Apr 03, 2023 1:23 pm
by standay
Tom, (not from Sergey!!)

I know you can use this:
Property UndoLimit sets the capacity of undo buffer. It can be used to disable undo/redo feature.
https://www.trichview.com/help/index.ht ... wedit.html

You'd probably have to set it to the current undo count:

Code: Select all

TRVEditRVData(rv.RVData).UndoList.Count
Maybe that will do it?

Stan

Re: Disable Undo/Redo temporarily

Posted: Mon Apr 03, 2023 1:51 pm
by tomr
Hi Stan,
I really appreciate your help. I have tried your suggestion and it works fine. I was not sure if setting the count to 0, would reset the undo list.
It does not. After setting the count back to the count I saved temporaily my undo list was correct :D

Thank you.
Best regards
Tom