New lines in InputField
- To: mathgroup at smc.vnet.net
- Subject: [mg117709] New lines in InputField
- From: "Chris Degnen" <degnen at cwgsy.net>
- 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}], DefaultButton[ DialogReturn[CreateDocument[TextCell[input, "Print"]]]]}, NotebookEventActions -> {}];