Skip to main content
Inspiring
Jun 26, 2009 3:32 AM UTC
Question

Single line text field

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

Inspiring
Jun 30, 2009 1:26 AM UTC

Thanks for that. Works perfect.

Translate
Inspiring
Jun 26, 2009 4:41 PM UTC

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

Translate