The WANTNORETURNS attribute forces a text field to reject newline characters when the user presses the Return key.




By default, text fields like TEXTEDIT insert a newline (ASCII 10) character in the text when the user presses the Return key. As the Return key is typically used to fire the accept action to validate the dialog, you can force the field to reject Return keys with this attribute.

The user can still enter new line characters with Shift-Return or Ctrl-Return, if these keys are not bound to actions.

For more details, see the TEXTEDIT item type.