Implement Undo method
-
I have use Text box to my project and i want to implement Undo method of the textbox. When i check CanUndo property of the textbox it always return false. somebody tell me how can i enable undo method to my textbox.
It helps to read the documentation on the TextBox class. Undo has already been implemented.
CanUndo
tells you if the last operation the user did in the TextBox can be undone or not. It does NOT enable or disable the Undo functionality of the TextBox. In whatever code you have that lets the user command an undo, you have to check theCanUndo
property of the TextBox and then, if true, call theUndo
method of the TextBox. You would also look into calling theClearUndo
method if appropriate in your situation.A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...