TabControl: Cancel Validating causes buttons on the tab page not responding to click event

Hi,

I am working on a MDI windows application. On one of the childeren form, I have a tab control.

when user try to jump from one tab page to another tab page, if there is change on current page, I need to use a message box to ask user to save change, and then use e.cancel = true to cancel the action. But this causes all the buttons on the tab page not responding to Click event, and also I cannot close the application.

Does anyone know what is happening

Thanks in advance.

Cathie



Answer this question

TabControl: Cancel Validating causes buttons on the tab page not responding to click event

  • NozFx

    This is a known problem with the TabControl, check this thread...


  • Corby111

    The thread got locked somehow, not sure what's up with that; I unlocked it again. I'd give it a shot (Leave event) but doubt it will fix the problem. Unfortunately, I can't think of a decent alternative for what you want to do, other than working with a StatusStrip to complain...


  • rob_a89

    Thanks for the response.

    Seems that I have to find another solution.

    My other option is to handle this on the Tabpage's leave event. But is there a way we can cancel leave event

    Thanks.


  • rod_r

    Thank for the advice.

    You mentioned you unlocked the thread, how did you accomplish it


  • TabControl: Cancel Validating causes buttons on the tab page not responding to click event