How can I create a Undo Drop Down like in Word?
Hello all,
Is it possible to create a undo drop down like in word? I'm using a RichTextBox and can get multiple undo's / redos working. I have also tried to make a drop down toolbar button and made a context menu tied to it so it lists all the undo / redo steps. Problem is I want to make it work like Word/VS where if you highlight more then just the first one (Say the third down) it will highlight the two about it also. I cant get this to work. Can I do this with a context menu or do I need to float a combo box under the button. Also how does it keep track of how many things to undo redo? I imagine removing and adding to the combo boxes will be the easy part. Any ideas appreciated. Thanks.
Allan.
Re: How can I create a Undo Drop Down like in Word?
Genereal Idea : keep and array filler with info regarding the undo and redo stuff. use that array to bind with the dropdown menu(or combobox) for the text you can use the first 5 words of the info inside the array or something.
then when the user click on the 3 one. highlight everything above the 3rd item in your combobox and when the user clicks it. just use all the info to change the text.
HTH
Re: How can I create a Undo Drop Down like in Word?
Maybe I wasn't making myself clear...I know what I want but putting it in words is a bit difficult. The actual progrmming is the easy part...when I update my undo/redo status I'll just do additem commands that will add the text. I don't need to even index anything or keep track of whats in the drop downs. Reason being is if they want to undo something three steps ago they have to undo 1 and 2, so if they click on the third thing I would just do a sendmessage with the undo command three times. The issue I have is I want it to look just like VB or Word does..have the list highlight as you scroll down and also list how many things it will undo/redo. Any ideas?
Allan.
Re: How can I create a Undo Drop Down like in Word?
You're going to have to build your own control to mimic this functionality.