public void CombinedKeyDown(CombinedKeyEvent e) { if (UseArrowKeys) { switch (e.KeyCode) { case Keys.Left: Iterate(-1); Accessed?.Invoke(this, EventArgs.Empty); e.Handled = true; break; case Keys.Right: Iterate(1); Accessed?.Invoke(this, EventArgs.Empty); e.Handled = true; break; case Keys.Up: Iterate(-m_Columns); Accessed?.Invoke(this, EventArgs.Empty); e.Handled = true; break; case Keys.Down: Iterate(m_Columns); Accessed?.Invoke(this, EventArgs.Empty); e.Handled = true; break; } } if (e.KeyData == Keys.Tab) { if (!Iterate(1, false)) { GUIUtilities.IterateTabStop(this.Parent, true); } Accessed?.Invoke(this, EventArgs.Empty); e.Handled = true; } else if (e.KeyData == (Keys.Tab | Keys.Shift)) { if (!Iterate(-1, false)) { GUIUtilities.IterateTabStop(this.Parent, false); } Accessed?.Invoke(this, EventArgs.Empty); e.Handled = true; } }
protected override bool ProcessTabKey(bool forward) { GUIUtilities.IterateTabStop(this, forward); return(true); // says that we have processed the key. We will do any normal moving between controls type navigation }