Any idea, is this feature request imlpemented yet? Can not find in documentation how do enable it...
is this feature request imlpemented yet?
I doubt it.
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.
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.
Answer: set allow_newlines = true in edit_field, e.g.
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.
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?
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).
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.
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.