Skip to content

Commit 6eb9a61

Browse files
committed
2008-09-15 Jonathan Pobst <monkey@jpobst.com>
* TextBoxBase.cs: If the user is using Ctrl-Tab to move focus, we have to remove the Ctrl in order for the focus moving code to kick in. [Fixes bug #426170] svn path=/trunk/mcs/; revision=113081
1 parent e92f25b commit 6eb9a61

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2008-09-15 Jonathan Pobst <monkey@jpobst.com>
2+
3+
* TextBoxBase.cs: If the user is using Ctrl-Tab to move focus, we
4+
have to remove the Ctrl in order for the focus moving code to kick in.
5+
[Fixes bug #426170]
6+
17
2008-09-15 Jonathan Pobst <monkey@jpobst.com>
28

39
* CheckedListBox.cs: Return the real item index from Add. It may not be

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,12 @@ protected override bool ProcessCmdKey (ref Message msg, Keys keyData)
11091109
#endif
11101110
protected override bool ProcessDialogKey (Keys keyData)
11111111
{
1112+
// The user can use Ctrl-Tab or Ctrl-Shift-Tab to move control focus
1113+
// instead of inserting a Tab. However, the focus-moving-tab-stuffs
1114+
// doesn't work if Ctrl is pushed, so we remove it before sending it.
1115+
if (accepts_tab && (keyData & (Keys.Control | Keys.Tab)) == (Keys.Control | Keys.Tab))
1116+
keyData ^= Keys.Control;
1117+
11121118
return base.ProcessDialogKey(keyData);
11131119
}
11141120

0 commit comments

Comments
 (0)