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