diff options
author | Chris Hubbard <chris_hubbard@sil.org> | 2014-12-08 18:35:56 +0300 |
---|---|---|
committer | Chris Hubbard <chris_hubbard@sil.org> | 2014-12-08 18:35:56 +0300 |
commit | 80b32bec272f8ecd5f680ab398dc5ca70e313d4c (patch) | |
tree | 3716b88bc29e63af6dc58ebf49cec3af1a39f513 /mcs/class/Managed.Windows.Forms/System.Windows.Forms | |
parent | 9df8a9e4f7c3e9c49eee7a59b81ec5a1b5ad33d9 (diff) |
[MWF] Use Ctrl+PageUp/PageDown for Tab Navigation
In the Windows implementation of the TabControl, Ctrl+PageUp
navigates to the previous tab and Ctrl+PageDown navigates to the
next tab (with both wrapping around). This change implements this
feature in the Mono implementation.
Change-Id: Ib940bd08d5ba641f05ed91c0e789e356e68f72bb
Diffstat (limited to 'mcs/class/Managed.Windows.Forms/System.Windows.Forms')
-rw-r--r-- | mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs index 4d7ef78c919..23c0534d856 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs @@ -817,6 +817,12 @@ namespace System.Windows.Forms { else SelectedIndex = (SelectedIndex + TabCount - 1) % TabCount; ke.Handled = true; + } else if (ke.KeyCode == Keys.PageUp && (ke.KeyData & Keys.Control) != 0) { + SelectedIndex = (SelectedIndex + TabCount - 1) % TabCount; + ke.Handled = true; + } else if (ke.KeyCode == Keys.PageDown && (ke.KeyData & Keys.Control) != 0) { + SelectedIndex = (SelectedIndex + 1) % TabCount; + ke.Handled = true; } else if (ke.KeyCode == Keys.Home) { SelectedIndex = 0; ke.Handled = true; |