MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

New lines in InputField

  • To: mathgroup at
  • Subject: [mg117709] New lines in InputField
  • From: "Chris Degnen" <degnen at>
  • Date: Wed, 30 Mar 2011 04:11:22 -0500 (EST)

Can anyone suggest how to enter new lines in input text,
preferably using the return key?
In the example below I can paste into an input field a piece
of text which includes new lines, such as these two sentences,
but new lines can't be typed straight in to the input field,
as users are wont to do.

CreateDialog[{TextCell["Enter your text here:"], 
   InputField[Dynamic[input], String, FieldSize -> {50, 12}], 
    DialogReturn[CreateDocument[TextCell[input, "Print"]]]]}, 
  NotebookEventActions -> {}];

  • Prev by Date: Sum of powers of multiplied terms
  • Next by Date: Re: How to swap real and imaginary parts and changing signs using Integrate
  • Previous by thread: Re: Sum of powers of multiplied terms
  • Next by thread: Re: New lines in InputField