.NET Winforms: prevent button click trigger for multiline text field in "AcceptButton" form included?

Well, my problem is this: I set the AcceptButton on the form and it gives me a good effect that it triggers the Click buttons of the event, but if I am in the MultiLine text box, I do not want this to happen. Then I just want him to enter into it.

Is there any way to do this?

+5
source share
2 answers

Set the AcceptsReturn property of the text box to true.

+14
source

The control TextBoxhas a property:

textbox1.AcceptsReturn = true;

MSDN Documentation

+6

All Articles