Главная страница | назад





Article #17526: Performing undo on an edit control.

 Question and Answer Database
FAQ2526D.txt Performing undo on an edit control.
Category :VCL
Platform :All
Product :All 32 bit
Question:
How can I programmatically undo changes in an edit type control?
Answer:
You can use:
Memo1.Perform(EM_UNDO, 0, 0);
If you want to check whether undo is available, so you can
enable or disable a menu item choice, you can check the
"Undo status" like this:
If Memo1.Perform(EM_CANUNDO, 0, 0) <> 0 then begin
{Undo is possible}
end;
To preform a "Redo" simply "Undo" a second time.
7/16/98 4:31:28 PM

Last Modified: 01-SEP-99