how to prevent doing enter in a field on a layout and resize it ?
Sorry, but can't quite figure out what you are asking.
i mean, for example in a field on my layout, when the user type "Enter" a new line is created in this field. how to avoid this?
When they press the enter key that's part of the Qwerty section of your keyboard on a windows system? (On mac's it's labeled "return".)
In field behavior, you can specify that the key be used to move the cursor to the next field in the tab or just like the tab key or the numeric keypad's enter key.
You could also a script trigger with OnObjectKeystroke that ignores the keystroke with use of Exit Script [false]