Skip to content

Conversation

@luke-ransfield
Copy link

Just for fun, I saw it and thought I'd it implement it.

Changes:

  • uses OnKeyDown instead of OnKeyPress so can use e.KeyCode == Keys.Tab and e.Shift (can revert to using e.KeyChar if that's preferred).
  • Used NextControl as base for PreviousControl
  • PreviousControl returns previous control by iterating through controls, storing reference to control in previousKey, until it breaks at current control
  • Handles if If current control is first in dictionary, will iterate through entire dict to get the last control.

To test:

  • run SampleCsModelessTabForm command, check that tab press increments tab index, check that tab-shift reverses tab index direction

Tried to keep consistent code style with existing. Also not sure what your contributions policy is (no worries if you don't accept PRs!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant