Skip to main content
areohbee
Legend
June 16, 2010
Question

Multi-line text field

  • June 16, 2010
  • 1 reply
  • 2761 views

Anybody know how to get a new-line into an edit-field, or some other way to have a multi-line text input?

If there isn't a way then consider this a feature request...

OK, so I found something in the SDK  that says I have to disable the default button in order for a new-line to be enterable, but how???

Rob

This topic has been closed for replies.

1 reply

johnrellis
Legend
June 16, 2010

Coincidentally, I was looking at the same issue today. The SDK Guide says:

NOTE: When the user types ENTER/RETURN in an edit field, the default button of the containing dialog is invoked. In the case of an Export dialog section, this is the Export button. If you do not want that to happen, disable the default button until the user indicates that input is done.

In the case of a custom dialog shown by LrDialogs.presentModalDialog(), there doesn't appear to be any documented way of disabling the default "OK" button.

I did notice that (on Windows), when typing into an edit field, typing a Ctrl+J will insert a newline. I'd guess you could also have a "Newline" button that would append a newline to the edit field.

areohbee
areohbeeAuthor
Legend
June 16, 2010

OK John - first one to figure out how to disable the default button wins, OK?

(I searched the net and found some other people with the question, but no answer yet...)

Until then, I guess its Ctrl-J & a new-line button - good ideas - thanks.

PS - Would that be Cmd-J on Mac?

Rob

johnrellis
Legend
June 16, 2010
Would that be Cmd-J on Mac?

Possibly.  But I half-recall that the Mac represents newlines differenly, so I couldn't guess as to whether it would work.