Take a look at the documentation for the properties of uicontrols. You can set the
Min properties of an edit box. I know it
seems crazy, but if
Max - Min > 1, the edit box will accept
multiline input; if
Max - Min <= 1, it is single line only.
Min properties have no
effect on edit box controls.