Dmytro
Tue Jun 13 07:26:39 CDT 2006
Hi!
I recall that for a usual, plain-text TextBox, there was a setting named
something like "Wants Return". This setting determined how the textbox
handled the Enter key - whether it processed the Enter keystroke, or allowed
the keystroke to "bubble up" to the parent window. The same seems to be true
for the RichTextBox control, however, I can't find a managed code-way to
change this setting. Hence, lookup the MSDN docs on the EM_SETOPTIONS
message and the ECO_WANTRETURN flag (the same as WS_WANTRETURN).
If you have no experience in using Windows API from .NET, consider the
following website:
http://www.pinvoke.net
and the "microsoft.public.dotnet.framework.interop" newsgroup.
<martin_link75@hotmail.com> wrote in message
news:1150193759.629775.288170@y43g2000cwc.googlegroups.com...
>I have a windows application with a main form with MDI children.
>
> Once in a while, not all the time, when a user hits return in a
> RichTextBox in (which reside in a tabcontrol in the MDI child form) the
> click event is triggered for a button in the same form. This is very
> strange and is upsetting my customers.
>
> If anyone experienced anything similar I would be very excited to hear
> about it.
>
> Any help would be greatly appreciated!
>
> Sincerely
> Martin
>