PC Review


Reply
Thread Tools Rate Thread

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

 
 
Sakharam Phapale
Guest
Posts: n/a
 
      6th Dec 2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RichTextBox text on MDI Parent form Undo Redo etc Jenbo Microsoft Dot NET Framework Forms 3 31st Jan 2007 05:12 PM
RichTextBox .Net text coloring with Undo enable nuwankkumara Microsoft C# .NET 0 20th Apr 2005 07:26 AM
RichTextBox undo/redo function doesn't work Alan Microsoft C# .NET 2 2nd Aug 2004 12:00 PM
richTextBox UNDO/REDO Mad Joe Microsoft C# .NET 11 20th Apr 2004 02:30 PM
? Redo command (undo undo) Alec S. Windows XP General 0 7th Apr 2004 06:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:04 AM.