How to allow user to enter 'Enter' in a RichTextBox

  • Thread starter Thread starter Richard Lewis Haggard
  • Start date Start date
R

Richard Lewis Haggard

In VS05, I have a form that has a standard RichTextBox control in which my
client wants to be able to type an Enter key and have the RichTextBox
respond by inserting a new line instead of either moving to the next control
in the Z order or closing the form. He doesn't want to use Ctrl+Enter. He
wants to use a plain Enter key. Now, back in the Bad Ole Days, there was an
attribute 'WantsReturnKey' that would enable exactly this sort of behaviour
but I do not see that particular attribute available now. What must one do
so that the Enter key is inserted into the RichTextBox instead of being
passed to the default form?
--
Richard Lewis Haggard
General: www.Haggard-And-Associates.com

"Have you noticed? Dogs have owners. Cats have staff."
Please come visit here for a couple thousand good giggles!:
www.haggard-and-associates.com/Humor/humor.htm
 
Thanks. It never occurred to me to look there.

By the way, you'll love this - now my client has filed a bug report saying
that the Tab key no longer shifts focus out of the RichTextBox. Pardon me
while I go find something flat and unyielding against which to repeatedly
apply my forehead with the most speed and force I can muster.
 
Back
Top