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

Multi-line text field

LEGEND ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

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

TOPICS
SDK

Views

2.3K

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 ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

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.

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 ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

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

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 ,
Jun 16, 2010 Jun 16, 2010

Copy link to clipboard

Copied

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.

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 ,
Jun 16, 2010 Jun 16, 2010

Copy link to clipboard

Copied

I guess one of my Mac client/users will let me know.

Do standby...

(Thanks)

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
Adobe Employee ,
Jun 16, 2010 Jun 16, 2010

Copy link to clipboard

Copied

Option-Return should get a newline inserted into a multi-line text field on the Mac.

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 ,
Jun 16, 2010 Jun 16, 2010

Copy link to clipboard

Copied

Drarvik,

Thank you for the useful info.

Any idea how to disable that default button?

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
LEGEND ,
Jun 16, 2010 Jun 16, 2010

Copy link to clipboard

Copied

Chet,

I'm guessing there is no way to not have the text pre-selected in an edit_field, but if you could confirm that (or deny/inform) it would also be appreciated.

Thanks in advance,

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
Adobe Employee ,
Jun 17, 2010 Jun 17, 2010

Copy link to clipboard

Copied

To my knowledge, there is indeed no way to not have the text in an edit field be pre-selected.

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 ,
Jun 15, 2010 Jun 15, 2010

Copy link to clipboard

Copied

Hi again John,

I've got another problem that the text is always selected, so as soon as the user types it wipes everything out. You wouldn't know how to force an append mode or something would you?

Thanks,

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
LEGEND ,
Jun 16, 2010 Jun 16, 2010

Copy link to clipboard

Copied

I've got another problem that the text is always selected, so as soon as the user types it wipes everything out. You wouldn't know how to force an append mode or something would you?

No idea on that one.

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
Adobe Employee ,
Jun 17, 2010 Jun 17, 2010

Copy link to clipboard

Copied

There is a documented way to disable the default button in the *Export* dialog (not in other dialogs). Look for LR_cantExportBecause in the SDK Guide.

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 ,
Jun 17, 2010 Jun 17, 2010

Copy link to clipboard

Copied

LATEST

Thank you - the information is helpful and very much appreciated.

Anything that can be done to remedy this would help at least two plugins .

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