• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Feature Request: A Way To Enter "New-Line" in an edit_field.

LEGEND ,
Jun 16, 2010 Jun 16, 2010

Copy link to clipboard

Copied

And, if there is a way, to make it obvious in the API and/or documentation.

Thanks,

Rob

TOPICS
SDK

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 14, 2014 Nov 14, 2014

Answer: set allow_newlines = true in edit_field, e.g.

vf:edit_field {

     -- ...

     allow_newlines = true,

}

Enter/return key will then have the effect hoped for: a newline instead of OK'ing the dialog box.

PS - credit to John Ellis for informing me/us of this undocumented feature.

Votes

Translate

Translate
Community Beginner ,
Feb 02, 2014 Feb 02, 2014

Copy link to clipboard

Copied

Any idea, is this feature request imlpemented yet? Can not find in documentation how do enable it...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 02, 2014 Feb 02, 2014

Copy link to clipboard

Copied

Serhit wrote:

is this feature request imlpemented yet?

I doubt it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 02, 2014 Feb 02, 2014

Copy link to clipboard

Copied

Is the request for a user to be able to do this, or for the fireld to be programattically updated to contain a new line?

A user might be able to shift + enter or alt/option + enter to add a new line. Be aware that if it does work it is likely to be platform specific so make sure to test on both Mac and Windows.

Matt

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 02, 2014 Feb 02, 2014

Copy link to clipboard

Copied

User.

Problem is: if user does the natural thing when editing a multi-line text field (i.e. presses "enter" at end of line), it dismisses the dialog box instead of adding a new-line to the text field.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 14, 2014 Nov 14, 2014

Copy link to clipboard

Copied

Answer: set allow_newlines = true in edit_field, e.g.

vf:edit_field {

     -- ...

     allow_newlines = true,

}

Enter/return key will then have the effect hoped for: a newline instead of OK'ing the dialog box.

PS - credit to John Ellis for informing me/us of this undocumented feature.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 07, 2014 Dec 07, 2014

Copy link to clipboard

Copied

Thanks for that, Rob, got me out of a scrape. Next, obvious, question would be, is there any way to enable scroll bars on the field, for when the text is too large for the field?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 07, 2014 Dec 07, 2014

Copy link to clipboard

Copied

You bet Kimaldis.

Well, multi-line edit fields do scroll if you cursor down.., but if you want scroll bars then you have to put them in a scrolled_view container (see LrView).

Rob

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Dec 08, 2014 Dec 08, 2014

Copy link to clipboard

Copied

Thanks, Rob. Of course the edit_field never changes size to accommodate more rows or columns but I can kind of get round that just by making it large. I'm hazarding that there might be a way to tie size with input events but I think that's a battle for another day.

Again, thanks for your input.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 08, 2014 Dec 08, 2014

Copy link to clipboard

Copied

LATEST
Of course the edit_field never changes size to accommodate more rows or columns

If you make the dialog resizable ("resizable = true") and set all the fill properties correctly, the edit_field will resize as the dialog resizes.  It's a pain to figure out how to set the fill properties, but it can be done.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines