[MWF] Use Ctrl+PageUp/PageDown for Tab Navigation
authorChris Hubbard <chris_hubbard@sil.org>
Mon, 8 Dec 2014 15:35:56 +0000 (10:35 -0500)
committerChris Hubbard <chris_hubbard@sil.org>
Mon, 8 Dec 2014 15:35:56 +0000 (10:35 -0500)
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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/TabControl.cs

index 4d7ef78c9191c0e7557a9b8e75e5eaec1685515d..23c0534d85654b7b614b4f034107fc29ee3adb3a 100644 (file)
@@ -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;