What event can I handle when a tabPage is removed from a TabControl in C# WinForms, so I can hide the window, if there are no tabPages in the TabControl?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
SelectedIndexChangedevent. Then use the((TabControl)sender).TabCountto determine if any tabs are left on the control. If the count is zero, hide the control.No matter how you accomplish grabbing the event, you’ll need to do a check against the tab count to hide your control.