469,275 Members | 1,432 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

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 2575

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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.