Solved

Undo/Redo function for memo

Posted on 2004-03-31
4
276 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
A short article about problems I had with the new location API and permissions in Marshmallow
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…

737 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