We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Keyboard behaviour on TabControl

How can I change the keyboard response for changing tab in the TabControl. I want it to conform to the Microsoft standard behaviour: Ctrl+PgDn -> Next Tab Ctrl+PgUp -> Previous tab Default behgaviour for the Syncfusion TabControl is the exact opposite.

1 Reply

AD Administrator Syncfusion Team December 21, 2004 02:29 AM UTC

Hi Illum, You could do so by deriving from the TabControlAdv and overriding its ProcessCmdKey method as shown in code below : public class CustomTabControlAdv : TabControlAdv { public CustomTabControlAdv () : base() {} protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Control | Keys.PageUp)) { if (this.SelectedIndex > 0) this.SelectedIndex--; } else if (keyData == (Keys.Control | Keys.PageDown)) { if (this.SelectedIndex < (this.TabCount-1)) this.SelectedIndex++; } return true; } } The complete test sample illustrating this workaround is attached here. We appreciate your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Loader.
Live Chat Icon For mobile
Up arrow icon