472,146 Members | 1,219 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

How to develop Undo Redo algorith for custom Text Editor using RichTextBox.

Hi All,

I am developing my own text editor using RichTextBox control.
I don't want to use RichTextBox Undo and Redo functions. Instead of that I
want to develop my own algorithm for Undo & Redo, as my application demands
it. Because for each word in text, I have associated data and so, require to
maintain state of associated data also.

Currently, I have developed algorithm which works on each key press.
On each key press event, I maintain state of richTextBox text by pushing
action key into stack. On each Undo operation, I pop that key and change the
state of RichTextBox text to previous state.

But, I don't understand how to develop algorithm which works like Microsoft
Word, which doesn't work on character by character basis.
Is it depends on word by word basis or time basis or type of key press
action like Delete, Space, Enter.

Hope that I explain my query reasonably well to understand.

Thanks and Regards,
Sakharam Phapale
Nov 21 '05 #1
0 2672

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Mad Joe | last post: by
1 post views Thread by Alan | last post: by
2 posts views Thread by Christian H | last post: by
reply views Thread by nuwankkumara | last post: by
reply views Thread by wizard of oz | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.