Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1210
WinTabControl - Prevent keyboard navigation
posted
Hello,

I have wizard style TabControl where I want to turn off the standard keyboard navigation, that is I don't want the user to change tabs by pressing Ctrl-Tab or Ctrl-Shift-Tab.

 How can I best accomplish this?Thank you,Trausti

 

Parents
No Data
Reply
  • 44743
    posted

    I assume if you want to disable the normal keyboard navigation, you will have buttons to allow this kind of navigation.  You can keep a flag in your application named something like allowSelectedTabChanging and initialize it to False. Then handle the SelectedTabChanging event. If the flag is set to False, set e.Cancel on the event args to True. In your 'Next' and 'Previous' navigation buttons, set the flag to True, set the new selected tab and the se tthe flag back to False.

Children