How to "UNDO" Form controls?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nilam2477
    New Member
    • Feb 2008
    • 38

    How to "UNDO" Form controls?

    I have a form with multiple TextBox controls and few other controls like comboBox, checkBox etc. I'm trying to implement Undo functionality for all the controls in the form. I'm using Push & Pop operations of Stack to store the control values.

    My question is regarding the TextBox control. I would like to know on which event of TextBox control i can save the Text in the stack. If i use TextChanged event, then this event is triggered on each character typed.
    I also know that TextBox Base provides Undo functionality but i dont want to use that, since my form contains multiple TextBox and other controls as well. And i would like to perform the Undo operation in sequence. Please help!
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    I think if you use the textBox leave event, you can do that,but you may want to find a way to know if the value was changed

    Comment

    Working...