Text area with Ctrl-Enter as newline key

Hello!

I have a form with a text area and a button.

Normally, the text entered in the text area is rather short, so by pressing enter the user must be able to submit the data.

However, in some rare cases the entered text includes several lines. For this case, I want to modify text area so that one can enter a new line by pressing Ctrl-Enter (it is not possible to use Enter for this purpose as it is already assigned to the button).

How can I tell text area that pressing Ctrl-Enter should create a new line?

Thanks in advance

Dmitri

H Dmitri,

glad to see more and more Russian names here, welcome aboard !

Interesting, in my case it already reacts to Ctrl Enter to make a new line, and does nothing on just Enter. Did you also set a lines count via setLines ?

Hello!

glad to see more and more Russian names here, welcome aboard !

Thanks!

After experimenting a bit I found out that Shift-Enter creates a new line. So the problem is solved.

Did you also set a lines count via setLines ?

There is no method setLines, only setRows. Yes, I called this method.

Best regards

Dmitri

oh sure, just mistyped, I meant setRows of course.