Solved

Undo/Redo function for memo

Posted on 2004-03-31
4
277 Views
Last Modified: 2010-04-17
I am developing a simplified Microsoft word application. I am using a Memo for the user to type in a document. I am not sure how to create an Undo or Redo function does anyone have any ideas?

Thanks
Myles
0
Comment
Question by:myleseven1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 27

Expert Comment

by:Dabas
ID: 10729551
Hi myleseven1,
What is your programming environment? VBA?

Dabas
0
 
LVL 1

Accepted Solution

by:
Typecast earned 50 total points
ID: 10735980
One way would be to create a stack, a type of collection. Every action a user does generates an entry in the stack(push). When he does Undo, you then remove the last entry in (pop).  You are then left with a stack containing all actions done so far expect the last one... I think it's the easiest way to do it.
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question