clive908

clive908

  • NA
  • 7
  • 0

TextBox.AcceptsReturns not working as expected

Mar 21 2006 9:31 AM
I have a dialog with many, many single-line textboxes. I set AcceptsReturns = false in each one. I would now expect the "KeyXxxx" events on the parent form to be triggered if I press the Enter key (which would allow me to close the form at any time and return "OK"). But this is not so. The Enter key gets "swallowed" by the text boxes. This mean I have to trap the "Enter" key in every single TextBox on my form! Is there a better way?