Skip to main content
Inspiring
June 26, 2009
Question

Single line text field

  • June 26, 2009
  • 2 replies
  • 824 views

How would I go about making an edit field that only allows a user ot type in a single line (e.g. for a basic form).

I sort of assumed the answer would lay with the textFlow.lineBreak commands ... Thought there would have been a "none" option or somehting but cant see any such option.

Can anyone offer an example? I'm obviously just blind

This topic has been closed for replies.

2 replies

Inspiring
June 30, 2009

Thanks for that. Works perfect.

Adobe Employee
June 26, 2009

Two things.  Disable the enter key for making new paragraphs.

var config:Configuration = new Configuration(TextFlow.defaultConfiguration)

config.manageEnterKey = "false"

var textFlow:TextFlow = new TextFlow(config)
// finish filling in the TextFlow; if using the importer there is a mechanism for passing in this modified Configuration

and

textFlow.lineBreak="explicit"

Richard