MarkItZero
Freshman
Hello,
I have a form which contains a tab control with three tabs.
I have coded the tab.Leave method for each tab to check to see if any of the data on the tab has been modified. If the data has been modified, then it asks whether the user wants to save the data.
This way, a user cannot switch between the tabs without saving or canceling the changes.
However also on the form, outside of the tab control are a Save button and an Exit button.
The Save and Exit buttons both contain their own code for checking and saving data.
The problem is that when a user attempts to click on either the Save or Exit button, the program runs the tab.Leave method, but not the Save.Click method.
The ability to check and save changes may be redundant in the button.click methods, so I could take that out, however, that still doesnt stop the problem of the User having to click on the Exit button twice if they wish to close the form.
I hope that makes sense.
Any Suggestions?
Thanks!
I have a form which contains a tab control with three tabs.
I have coded the tab.Leave method for each tab to check to see if any of the data on the tab has been modified. If the data has been modified, then it asks whether the user wants to save the data.
This way, a user cannot switch between the tabs without saving or canceling the changes.
However also on the form, outside of the tab control are a Save button and an Exit button.
The Save and Exit buttons both contain their own code for checking and saving data.
The problem is that when a user attempts to click on either the Save or Exit button, the program runs the tab.Leave method, but not the Save.Click method.
The ability to check and save changes may be redundant in the button.click methods, so I could take that out, however, that still doesnt stop the problem of the User having to click on the Exit button twice if they wish to close the form.
I hope that makes sense.
Any Suggestions?
Thanks!