I've been trying to get undo and redo working in my text editor for about 3 days now. It's doing my head in.
I have a text box (named richTextBoxPrintCtrl1
), which I would like to be able to undo and *redo *(word by word).
So if I click the undo button, it undoes the last word. And if I then clicked the redo button, it redoes the last word.
Could somebody help me get this working?
richTextBoxPrintCtrl1.Undo();
doesn't work very well. It deletes everything typed in the text box.
Thanks in advance for your help.
I know this question has been asked many times before, but I can't get it working using the information from the questions I've browsed here on SO.