Hi
I have a user control which has 1 textbox and a Save button.If a user type some text in the textbox and forgets to save and moves to another tab,I want to show a dialog result.If the user selects yes then the user will move to another tab.But if the user selects no I want the user to stay in this form.How can I do it?
thnx in advance
Dimansu
0
Light Poster
Recommended Answers
Jump to PostI not sure how you can do it from within your user control, but you can experiment around using the tabcontrol's selecting event handler. Have the save button set the _saved var.
public partial class Form1 : Form { private bool _saved = false; public Form1() { …
All 3 Replies
JerryShaw
46
Posting Pro in Training
Dimansu
0
Light Poster
Geekitygeek
480
Nearly a Posting Virtuoso
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.